From 816d355d89947cb289669176e077be4fe299dcf6 Mon Sep 17 00:00:00 2001 From: Tilghman Lesher Date: Wed, 4 Jun 2008 20:35:38 +0000 Subject: [PATCH] Merged revisions 120477 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r120477 | tilghman | 2008-06-04 15:34:52 -0500 (Wed, 04 Jun 2008) | 2 lines MSet doesn't necessarily need chan to be set ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@120478 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/pbx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main/pbx.c b/main/pbx.c index b59f8686f6..6566e20e15 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -7579,7 +7579,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; } @@ -7593,6 +7593,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); }