[asterisk-commits] russell: branch russell/ast_channel_ao2 r183637 - /team/russell/ast_channel_a...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Mar 21 12:22:51 CDT 2009


Author: russell
Date: Sat Mar 21 12:22:45 2009
New Revision: 183637

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=183637
Log:
Fix another place that changed the channel name directly

Modified:
    team/russell/ast_channel_ao2/channels/chan_dahdi.c

Modified: team/russell/ast_channel_ao2/channels/chan_dahdi.c
URL: http://svn.digium.com/svn-view/asterisk/team/russell/ast_channel_ao2/channels/chan_dahdi.c?view=diff&rev=183637&r1=183636&r2=183637
==============================================================================
--- team/russell/ast_channel_ao2/channels/chan_dahdi.c (original)
+++ team/russell/ast_channel_ao2/channels/chan_dahdi.c Sat Mar 21 12:22:45 2009
@@ -11992,9 +11992,13 @@
 				new->owner = old->owner;
 				old->owner = NULL;
 				if (new->owner) {
-					ast_string_field_build(new->owner, name,
-						"DAHDI/%d:%d-%d", pri->trunkgroup,
-						new->channel, 1);
+					char newname[AST_CHANNEL_NAME];
+
+					snprintf(newname, sizeof(newname),
+						"DAHDI/%d:%d-%d", pri->trunkgroup, new->channel, 1);
+
+					ast_change_name(new->owner, newname);
+
 					new->owner->tech_pvt = new;
 					ast_channel_set_fd(new->owner, 0, new->subs[SUB_REAL].dfd);
 					new->subs[SUB_REAL].owner = old->subs[SUB_REAL].owner;




More information about the asterisk-commits mailing list