[Asterisk-cvs] asterisk/apps app_chanisavail.c,1.6,1.7

markster at lists.digium.com markster at lists.digium.com
Sun Jun 6 12:34:37 CDT 2004


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

Modified Files:
	app_chanisavail.c 
Log Message:
Can't use the same buffer to snprintf that we're grabbing


Index: app_chanisavail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_chanisavail.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- app_chanisavail.c	5 Jun 2004 18:42:59 -0000	1.6
+++ app_chanisavail.c	6 Jun 2004 17:36:57 -0000	1.7
@@ -54,7 +54,7 @@
 {
 	int res=-1;
 	struct localuser *u;
-	char info[512], *peers, *tech, *number, *rest, *cur;
+	char info[512], tmp[512], *peers, *tech, *number, *rest, *cur;
 	struct ast_channel *tempchan;
 
 	if (!data) {
@@ -85,8 +85,8 @@
 			if ((tempchan = ast_request(tech, chan->nativeformats, number))) {
 					pbx_builtin_setvar_helper(chan, "AVAILCHAN", tempchan->name);
 					/* Store the originally used channel too */
-					snprintf(info, sizeof(info), "%s/%s", tech, number);
-					pbx_builtin_setvar_helper(chan, "AVAILORIGCHAN", info);
+					snprintf(tmp, sizeof(tmp), "%s/%s", tech, number);
+					pbx_builtin_setvar_helper(chan, "AVAILORIGCHAN", tmp);
 					ast_hangup(tempchan);
 					tempchan = NULL;
 					res = 1;




More information about the svn-commits mailing list