[svn-commits] bmd: branch group/newcdr r116730 - /team/group/newcdr/funcs/func_channel.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu May 15 19:50:49 CDT 2008


Author: bmd
Date: Thu May 15 19:50:49 2008
New Revision: 116730

URL: http://svn.digium.com/view/asterisk?view=rev&rev=116730
Log:
prevent a segfault if accessing a non-existing CHANNEL() variable in CEL

Modified:
    team/group/newcdr/funcs/func_channel.c

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=116730&r1=116729&r2=116730
==============================================================================
--- team/group/newcdr/funcs/func_channel.c (original)
+++ team/group/newcdr/funcs/func_channel.c Thu May 15 19:50:49 2008
@@ -95,8 +95,7 @@
 	else if (!strcasecmp(data, "callgroup")) {
 		char groupbuf[256];
 		locked_copy_string(chan, buf,  ast_print_group(groupbuf, sizeof(groupbuf), chan->callgroup), len);
-	} else if (!chan->tech->func_channel_read
-		 || chan->tech->func_channel_read(chan, function, data, buf, len)) {
+	} else if (!chan->tech || !chan->tech->func_channel_read || chan->tech->func_channel_read(chan, function, data, buf, len)) {
 		ast_log(LOG_WARNING, "Unknown or unavailable item requested: '%s'\n", data);
 		ret = -1;
 	}




More information about the svn-commits mailing list