[asterisk-commits] murf: branch group/newcdr r155969 - in /team/group/newcdr: ./ funcs/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Nov 11 12:23:06 CST 2008
Author: murf
Date: Tue Nov 11 12:23:05 2008
New Revision: 155969
URL: http://svn.digium.com/view/asterisk?view=rev&rev=155969
Log:
finish BRIDGEPEER work in target func CHANNEL
Modified:
team/group/newcdr/ (props changed)
team/group/newcdr/funcs/func_channel.c
Propchange: team/group/newcdr/
------------------------------------------------------------------------------
automerge = yes
Modified: team/group/newcdr/funcs/func_channel.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/funcs/func_channel.c?view=diff&rev=155969&r1=155968&r2=155969
==============================================================================
--- team/group/newcdr/funcs/func_channel.c (original)
+++ team/group/newcdr/funcs/func_channel.c Tue Nov 11 12:23:05 2008
@@ -290,8 +290,15 @@
p = ast_bridged_channel(chan);
if (p || chan->tech || chan->cdr) /* dummy channel? if so, we hid the peer name in the language */
ast_copy_string(buf, (p ? p->name : ""), len);
- else
- ast_copy_string(buf, chan->language, len); /* a horrible kludge, but... how else? */
+ else {
+ /* a dummy channel can still pass along bridged peer info via
+ the BRIDGEPEER variable */
+ const char *pname = pbx_builtin_getvar_helper(chan, "BRIDGEPEER");
+ if (!ast_strlen_zero(pname))
+ ast_copy_string(buf, pname, len); /* a horrible kludge, but... how else? */
+ else
+ buf[0] = 0;
+ }
ast_channel_unlock(chan);
} else if (!strcasecmp(data, "uniqueid")) {
locked_copy_string(chan, buf, chan->uniqueid, len);
More information about the asterisk-commits
mailing list