[svn-commits] jrose: branch 1.8 r310088 - /branches/1.8/channels/sip/dialplan_functions.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Mar 8 14:19:36 CST 2011


Author: jrose
Date: Tue Mar  8 14:19:32 2011
New Revision: 310088

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=310088
Log:
Returns with an error notice if CHANNEL function of SIP channel is read without arguments.

(Closes issue #18653)
Reported by: wuwu
Patches:
      diff.patch uploaded by jrose (license 1225)
Tested by: jrose


Modified:
    branches/1.8/channels/sip/dialplan_functions.c

Modified: branches/1.8/channels/sip/dialplan_functions.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/sip/dialplan_functions.c?view=diff&rev=310088&r1=310087&r2=310088
==============================================================================
--- branches/1.8/channels/sip/dialplan_functions.c (original)
+++ branches/1.8/channels/sip/dialplan_functions.c Tue Mar  8 14:19:32 2011
@@ -47,6 +47,13 @@
 		AST_APP_ARG(type);
 		AST_APP_ARG(field);
 	);
+		
+	/* Check for zero arguments */
+	if (ast_strlen_zero(parse)) {
+		ast_log(LOG_ERROR, "Cannot call %s without arguments\n", funcname);
+		return -1;
+	}
+
 	AST_STANDARD_APP_ARGS(args, parse);
 
 	/* Sanity check */




More information about the svn-commits mailing list