[Asterisk-cvs] asterisk acl.c,1.20,1.21

markster at lists.digium.com markster at lists.digium.com
Thu May 27 17:16:39 CDT 2004


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv4502

Modified Files:
	acl.c 
Log Message:
Fix gross oversights in original ACL patch


Index: acl.c
===================================================================
RCS file: /usr/cvsroot/asterisk/acl.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- acl.c	27 May 2004 20:53:02 -0000	1.20
+++ acl.c	27 May 2004 21:31:25 -0000	1.21
@@ -93,11 +93,12 @@
 {
 	struct ast_ha *start=original;
 	struct ast_ha *ret = NULL;
-	struct ast_ha *link,*prev;
+	struct ast_ha *link,*prev=NULL;
 
 	while(start) {
 		link = ast_duplicate_ha(start);  /* Create copy of this object */
-		prev->next = link;		/* Link previous to this object */
+		if (prev)
+			prev->next = link;		/* Link previous to this object */
 
 		if (!ret) 
 			ret = link;		/* Save starting point */
@@ -112,7 +113,7 @@
 struct ast_ha *ast_append_ha(char *sense, char *stuff, struct ast_ha *path)
 {
 	struct ast_ha *ha = malloc(sizeof(struct ast_ha));
-	char *nm;
+	char *nm="255.255.255.255";
 	char tmp[256] = "";
 	struct ast_ha *prev = NULL;
 	struct ast_ha *ret;




More information about the svn-commits mailing list