]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
a small fix for a crash that occurs when compiling AEL with global vars
authorSteve Murphy <murf@digium.com>
Thu, 5 Jun 2008 21:34:42 +0000 (21:34 +0000)
committerSteve Murphy <murf@digium.com>
Thu, 5 Jun 2008 21:34:42 +0000 (21:34 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@120828 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/pbx.c

index bc006c994b551d10477677cbf998dc3a34a6983c..343ed85dfd785119d5e8a9ff014631ff7158ed2f 100644 (file)
@@ -7901,7 +7901,7 @@ 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) {
+               } 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);