[asterisk-commits] russell: trunk r290714 - in /trunk: ./ main/pbx.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Oct 7 06:12:53 CDT 2010
Author: russell
Date: Thu Oct 7 06:12:50 2010
New Revision: 290714
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=290714
Log:
Merged revisions 290713 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
................
r290713 | russell | 2010-10-07 13:00:52 +0200 (Thu, 07 Oct 2010) | 11 lines
Merged revisions 290712 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
........
r290712 | russell | 2010-10-07 12:53:56 +0200 (Thu, 07 Oct 2010) | 4 lines
Don't crash when Set() is called without a value.
Review: https://reviewboard.asterisk.org/r/949/
........
................
Modified:
trunk/ (props changed)
trunk/main/pbx.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: trunk/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/pbx.c?view=diff&rev=290714&r1=290713&r2=290714
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Thu Oct 7 06:12:50 2010
@@ -9550,11 +9550,18 @@
mydata = ast_strdupa(data);
name = strsep(&mydata, "=");
value = mydata;
- if (strchr(name, ' '))
+ if (!value) {
+ ast_log(LOG_WARNING, "Set requires an '=' to be a valid assignment.\n");
+ return 0;
+ }
+
+ if (strchr(name, ' ')) {
ast_log(LOG_WARNING, "Please avoid unnecessary spaces on variables as it may lead to unexpected results ('%s' set to '%s').\n", name, mydata);
+ }
pbx_builtin_setvar_helper(chan, name, value);
- return(0);
+
+ return 0;
}
int pbx_builtin_setvar_multiple(struct ast_channel *chan, const char *vdata)
More information about the asterisk-commits
mailing list