[svn-commits] mmichelson: branch 1.4 r150298 - /branches/1.4/main/manager.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Oct 16 18:34:38 CDT 2008


Author: mmichelson
Date: Thu Oct 16 18:34:37 2008
New Revision: 150298

URL: http://svn.digium.com/view/asterisk?view=rev&rev=150298
Log:
Don't try to call a dialplan function's read callback from
the manager's GetVar handler if an invalid channel has
been specified. Several dialplan functions, including
CHANNEL and SIP_HEADER, do not check for NULL-ness of
the channel being passed in.

(closes issue #13715)
Reported by: makoto


Modified:
    branches/1.4/main/manager.c

Modified: branches/1.4/main/manager.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/manager.c?view=diff&rev=150298&r1=150297&r2=150298
==============================================================================
--- branches/1.4/main/manager.c (original)
+++ branches/1.4/main/manager.c Thu Oct 16 18:34:37 2008
@@ -1499,7 +1499,9 @@
 
 	if (varname[strlen(varname) - 1] == ')') {
 		char *copy = ast_strdupa(varname);
-
+		if (!c) {
+			astman_send_error(s, m, "No such channel");
+		}
 		ast_func_read(c, copy, workspace, sizeof(workspace));
 		varval = workspace;
 	} else {




More information about the svn-commits mailing list