[asterisk-commits] rizzo: trunk r48498 - /trunk/channels/chan_zap.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Dec 15 08:40:58 MST 2006


Author: rizzo
Date: Fri Dec 15 09:40:57 2006
New Revision: 48498

URL: http://svn.digium.com/view/asterisk?view=rev&rev=48498
Log:
replace ast_safe_string_alloc() with asprintf()


Modified:
    trunk/channels/chan_zap.c

Modified: trunk/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_zap.c?view=diff&rev=48498&r1=48497&r2=48498
==============================================================================
--- trunk/channels/chan_zap.c (original)
+++ trunk/channels/chan_zap.c Fri Dec 15 09:40:57 2006
@@ -5513,13 +5513,13 @@
 			free(b2);
 #ifdef HAVE_PRI
 		if (i->bearer || (i->pri && (i->sig == SIG_FXSKS)))
-			b2 = ast_safe_string_alloc("Zap/%d:%d-%d", i->pri->trunkgroup, i->channel, y);
+			asprintf(&b2, "Zap/%d:%d-%d", i->pri->trunkgroup, i->channel, y);
 		else
 #endif
 		if (i->channel == CHAN_PSEUDO)
-			b2 = ast_safe_string_alloc("Zap/pseudo-%d", ast_random());
+			asprintf(&b2, "Zap/pseudo-%ld", ast_random());
 		else	
-			b2 = ast_safe_string_alloc("Zap/%d-%d", i->channel, y);
+			asprintf(&b2, "Zap/%d-%d", i->channel, y);
 		for (x = 0; x < 3; x++) {
 			if ((index != x) && i->subs[x].owner && !strcasecmp(b2, i->subs[x].owner->name))
 				break;



More information about the asterisk-commits mailing list