[asterisk-commits] mmichelson: branch group/CCSS r217871 - /team/group/CCSS/channels/chan_local.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 10 16:57:20 CDT 2009


Author: mmichelson
Date: Thu Sep 10 16:57:16 2009
New Revision: 217871

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=217871
Log:
Add necessary logic to chan_local to set the
CC_INTERFACES variable on nested Dials.


Modified:
    team/group/CCSS/channels/chan_local.c

Modified: team/group/CCSS/channels/chan_local.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/CCSS/channels/chan_local.c?view=diff&rev=217871&r1=217870&r2=217871
==============================================================================
--- team/group/CCSS/channels/chan_local.c (original)
+++ team/group/CCSS/channels/chan_local.c Thu Sep 10 16:57:16 2009
@@ -543,6 +543,8 @@
 	int res;
 	struct ast_var_t *varptr = NULL, *new;
 	size_t len, namelen;
+	char *reduced_dest = ast_strdupa(dest);
+	char *slash;
 
 	if (!p)
 		return -1;
@@ -623,6 +625,14 @@
 		}
 	}
 	ast_channel_datastore_inherit(p->owner, p->chan);
+	/* If the local channel has /n or /b on the end of it,
+	 * we need to lop that off for our argument to setting
+	 * up the CC_INTERFACES variable
+	 */
+	if ((slash = strrchr(reduced_dest, '/'))) {
+		*slash = '\0';
+	}
+	ast_set_cc_interfaces_chanvar(p->chan, reduced_dest);
 
 	/* Start switch on sub channel */
 	if (!(res = ast_pbx_start(p->chan)))




More information about the asterisk-commits mailing list