From b457fec36399c1f7de093d5e92bb4fa453b79c86 Mon Sep 17 00:00:00 2001 From: Jakub Sławiński Date: Sun, 5 Feb 2006 15:14:03 +0100 Subject: v0.8 - Fixed: infinite loop after buffering message - Fixed: corrupt packets after closing connections in the stopped state - Fixed: bug in mapping user numbers between afclient and afserver - Fixed: premature close of the service connection - Fixed: invalid buffering when the connection is closing - Added: Multiple tunnels in one afclient<->afserver connection --- src/audit_list_struct.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/audit_list_struct.c') diff --git a/src/audit_list_struct.c b/src/audit_list_struct.c index 9eeeafe..3431dd2 100644 --- a/src/audit_list_struct.c +++ b/src/audit_list_struct.c @@ -22,6 +22,7 @@ #include #include +#include #include "audit_list_struct.h" @@ -35,6 +36,7 @@ AuditList* AuditList_new() { AuditList* tmp = calloc(1, sizeof(AuditList)); + assert(tmp != NULL); if (tmp == NULL) { return NULL; } @@ -50,9 +52,11 @@ AuditList_new() void AuditList_free(AuditList** al) { + assert(al != NULL); if (al == NULL) { return; } + assert((*al) != NULL); if ((*al) == NULL) { return; } @@ -71,9 +75,11 @@ AuditList_free(AuditList** al) void AuditList_insert_back(AuditList* al, AuditListNode* aln) { + assert(al != NULL); if (al == NULL) { return; } + assert(aln != NULL); if (aln == NULL) { return; } @@ -97,6 +103,7 @@ AuditList_insert_back(AuditList* al, AuditListNode* aln) AuditListNode* AuditList_get_first(AuditList* al) { + assert(al != NULL); if (al == NULL) { return NULL; } @@ -113,6 +120,7 @@ void AuditList_delete_first(AuditList* al) { AuditListNode* tmp = AuditList_get_first(al); + assert(tmp != NULL); if (tmp == NULL) { return; } @@ -134,6 +142,10 @@ AuditList_delete_first(AuditList* al) void AuditList_clear(AuditList* al) { + assert(al != NULL); + if (al == NULL) { + return; + } while (AuditList_get_first(al)) { AuditList_delete_first(al); } -- cgit v1.1