Fix some more fax test errors due to needing the peer in a bridge
authorMatthew Jordan <mjordan@digium.com>
Mon, 27 May 2013 01:33:12 +0000 (01:33 +0000)
committerMatthew Jordan <mjordan@digium.com>
Mon, 27 May 2013 01:33:12 +0000 (01:33 +0000)
commit2d2a47fae380a78ef9a2f14cb8dcb84d58ef58c5
tree831214d29098f37a481f7b315f8aea64e2808203
parenta0f6d1848bd42e7379b46c7952460f1711e4d0fb
Fix some more fax test errors due to needing the peer in a bridge

In r389799, a number of fax errors in gateway mode were fixed by using the
appropriate function to get a channel's peer while in a bridge. This patch
does two things:
(1) It uses the same function in res_fax_spandsp while starting the fax
    gateway. Without this, the fax gateway will not actually start up, as
    res_fax_spandsp also must inspect the channel's peer in a two-party
    bridge
(2) It refactors some ao2 objects in sendfax_exec to use RAII_VAR. This was
    reverted in r389799 as some off nominal paths were getting hit without
    the fix in (1) that indicated an ao2 object issue; this turned out to
    be a red herring (which is an odd phrase)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
res/res_fax.c
res/res_fax_spandsp.c