[asterisk-commits] file: trunk r66604 - in /trunk/channels: chan_features.c chan_zap.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed May 30 09:11:57 MST 2007


Author: file
Date: Wed May 30 11:11:57 2007
New Revision: 66604

URL: http://svn.digium.com/view/asterisk?view=rev&rev=66604
Log:
This concludes my tweaking of things.

Modified:
    trunk/channels/chan_features.c
    trunk/channels/chan_zap.c

Modified: trunk/channels/chan_features.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_features.c?view=diff&rev=66604&r1=66603&r2=66604
==============================================================================
--- trunk/channels/chan_features.c (original)
+++ trunk/channels/chan_features.c Wed May 30 11:11:57 2007
@@ -462,7 +462,7 @@
 	for (x=1;x<4;x++) {
 		if (b2)
 			free(b2);
-		asprintf(&b2, "Feature/%s/%s-%d", p->tech, p->dest, x);
+		asprintf(&b2, "%s/%s-%d", p->tech, p->dest, x);
 		for (y=0;y<3;y++) {
 			if (y == index)
 				continue;
@@ -472,7 +472,7 @@
 		if (y >= 3)
 			break;
 	}
-	tmp = ast_channel_alloc(0, state, 0,0, "", "", "", 0, b2);
+	tmp = ast_channel_alloc(0, state, 0,0, "", "", "", 0, "Feature/%s", b2);
 	/* free up the name, it was copied into the channel name */
 	if (b2)
 		free(b2);

Modified: trunk/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_zap.c?view=diff&rev=66604&r1=66603&r2=66604
==============================================================================
--- trunk/channels/chan_zap.c (original)
+++ trunk/channels/chan_zap.c Wed May 30 11:11:57 2007
@@ -5532,20 +5532,20 @@
 			free(b2);
 #ifdef HAVE_PRI
 		if (i->bearer || (i->pri && (i->sig == SIG_FXSKS)))
-			asprintf(&b2, "Zap/%d:%d-%d", i->pri->trunkgroup, i->channel, y);
+			asprintf(&b2, "%d:%d-%d", i->pri->trunkgroup, i->channel, y);
 		else
 #endif
 		if (i->channel == CHAN_PSEUDO)
-			asprintf(&b2, "Zap/pseudo-%ld", ast_random());
+			asprintf(&b2, "pseudo-%ld", ast_random());
 		else	
-			asprintf(&b2, "Zap/%d-%d", i->channel, y);
+			asprintf(&b2, "%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;
 		}
 		y++;
 	} while (x < 3);
-	tmp = ast_channel_alloc(0, state, i->cid_num, i->cid_name, i->accountcode, i->exten, i->context, i->amaflags, b2);
+	tmp = ast_channel_alloc(0, state, i->cid_num, i->cid_name, i->accountcode, i->exten, i->context, i->amaflags, "Zap/%s", b2);
 	if (b2) /*!> b2 can be freed now, it's been copied into the channel structure */
 		free(b2);
 	if (!tmp)



More information about the asterisk-commits mailing list