Remove extraneous BRIDGEPEER AMI VarSet event on a CEL dummy channel.
authorRichard Mudgett <rmudgett@digium.com>
Wed, 11 Jan 2012 22:53:09 +0000 (22:53 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 11 Jan 2012 22:53:09 +0000 (22:53 +0000)
(closes issue ASTERISK-19180)
Reported by: Corey Farrell
Patches:
      asterisk_cel_noevent_varset.diff (license #5909) patch uploaded by Corey Farrell
........

Merged revisions 350452 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 350453 from http://svn.asterisk.org/svn/asterisk/branches/10

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350454 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/cel.c

index f03b51d..2c46e5f 100644 (file)
@@ -462,7 +462,9 @@ struct ast_channel *ast_cel_fabricate_channel_from_event(const struct ast_event
        ast_string_field_set(tchan, peeraccount, record.peer_account);
        ast_string_field_set(tchan, userfield, record.user_field);
 
-       pbx_builtin_setvar_helper(tchan, "BRIDGEPEER", record.peer);
+       if ((newvariable = ast_var_assign("BRIDGEPEER", record.peer))) {
+               AST_LIST_INSERT_HEAD(headp, newvariable, entries);
+       }
 
        tchan->appl = ast_strdup(record.application_name);
        tchan->data = ast_strdup(record.application_data);