[Asterisk-cvs] asterisk asterisk.c,1.51.2.11,1.51.2.12

citats at lists.digium.com citats at lists.digium.com
Wed Apr 7 14:25:57 CDT 2004


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/home/citats/cvs/asterisk-stable

Modified Files:
      Tag: v1-0_stable
	asterisk.c 
Log Message:
Fix command completion and remove compile time warnings



Index: asterisk.c
===================================================================
RCS file: /usr/cvsroot/asterisk/asterisk.c,v
retrieving revision 1.51.2.11
retrieving revision 1.51.2.12
diff -u -d -r1.51.2.11 -r1.51.2.12
--- asterisk.c	6 Apr 2004 07:42:19 -0000	1.51.2.11
+++ asterisk.c	7 Apr 2004 18:26:38 -0000	1.51.2.12
@@ -868,7 +868,7 @@
                         match_list = realloc(match_list, match_list_len * sizeof(char *));
 		}
 
-		match_list[matches++] = retstr;
+		match_list[matches++] = strdup(retstr);
 	}
 
         if (!match_list)
@@ -974,7 +974,7 @@
 			/* Start with a 2048 byte buffer */
 			mbuf = malloc(maxmbuf);
 			if (!mbuf)
-				return (CC_ERROR);
+				return (char *)(CC_ERROR);
 			snprintf(buf, sizeof(buf),"_COMMAND MATCHESARRAY \"%s\" \"%s\"", lf->buffer, ptr); 
 			fdprint(ast_consock, buf);
 			res = 0;
@@ -984,7 +984,7 @@
 					maxmbuf += 1024;
 					mbuf = realloc(mbuf, maxmbuf);
 					if (!mbuf)
-						return (CC_ERROR);
+						return (char *)(CC_ERROR);
 				}
 				/* Only read 1024 bytes at a time */
 				res = read(ast_consock, mbuf + mlen, 1024);




More information about the svn-commits mailing list