manager: Fix crash when appending a manager channel variable
authorMatthew Jordan <mjordan@digium.com>
Sat, 28 Sep 2013 20:27:23 +0000 (20:27 +0000)
committerMatthew Jordan <mjordan@digium.com>
Sat, 28 Sep 2013 20:27:23 +0000 (20:27 +0000)
commit2ef63eaf3402575706533eb400c09eb3bebe6c48
tree909d300a49e1a67853a0ae4f6a143b8c8e90902a
parent2b32732aa814647d5a098043225c9a66eefb76d9
manager: Fix crash when appending a manager channel variable

In r399887, a minor performance improvement was introduced by not allocating
the manager variable struct if it wasn't used. Unfortunately, when directly
accessing an ast_channel struct, manager assumed that the struct was always
allocated. Since this was no longer the case, things got a bit crashy.

This fixes that problem by simply bypassing appending variables if the manager
channel variable struct isn't there.
........

Merged revisions 400058 from http://svn.asterisk.org/svn/asterisk/branches/12

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