aboutsummaryrefslogtreecommitdiffstats
path: root/main/pbx.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-04 20:34:52 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-04 20:34:52 +0000
commitbf801481861a7bd6bda9c44a6e7899694bbf9b96 (patch)
tree7ac067b468c6a0624f5c89bb54467b976be109a4 /main/pbx.c
parent9be088d95a4f21dc7c2f8bb36fb6e76015a96af9 (diff)
MSet doesn't necessarily need chan to be set
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@120477 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/pbx.c')
-rw-r--r--main/pbx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/pbx.c b/main/pbx.c
index 2b0ee7603..bc006c994 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -7887,7 +7887,7 @@ int pbx_builtin_setvar_multiple(struct ast_channel *chan, void *vdata)
AST_APP_ARG(value);
);
- if (ast_strlen_zero(vdata) || !chan) {
+ if (ast_strlen_zero(vdata)) {
ast_log(LOG_WARNING, "MSet requires at least one variable name/value pair.\n");
return 0;
}
@@ -7901,6 +7901,8 @@ int pbx_builtin_setvar_multiple(struct ast_channel *chan, void *vdata)
pbx_builtin_setvar_helper(chan, pair.name, pair.value);
if (strchr(pair.name, ' '))
ast_log(LOG_WARNING, "Please avoid unnecessary spaces on variables as it may lead to unexpected results ('%s' set to '%s').\n", pair.name, pair.value);
+ } else if (chan) {
+ ast_log(LOG_WARNING, "MSet: ignoring entry '%s' with no '='\n", pair.name);
} else {
ast_log(LOG_WARNING, "MSet: ignoring entry '%s' with no '=' (in %s@%s:%d\n", pair.name, chan->exten, chan->context, chan->priority);
}