diff options
author | Matthew Jordan <mjordan@digium.com> | 2013-05-27 01:33:12 +0000 |
---|---|---|
committer | Matthew Jordan <mjordan@digium.com> | 2013-05-27 01:33:12 +0000 |
commit | 2d2a47fae380a78ef9a2f14cb8dcb84d58ef58c5 (patch) | |
tree | 831214d29098f37a481f7b315f8aea64e2808203 /res/res_fax_spandsp.c | |
parent | a0f6d1848bd42e7379b46c7952460f1711e4d0fb (diff) |
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
Diffstat (limited to 'res/res_fax_spandsp.c')
-rw-r--r-- | res/res_fax_spandsp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/res/res_fax_spandsp.c b/res/res_fax_spandsp.c index bc51f28c9..bd2bb3c9c 100644 --- a/res/res_fax_spandsp.c +++ b/res/res_fax_spandsp.c @@ -761,7 +761,7 @@ static int spandsp_fax_gateway_start(struct ast_fax_session *s) { struct spandsp_pvt *p = s->tech_pvt; struct ast_fax_t38_parameters *t38_param; int i; - struct ast_channel *peer; + RAII_VAR(struct ast_channel *, peer, NULL, ao2_cleanup); static struct ast_generator t30_gen = { .alloc = spandsp_fax_gw_gen_alloc, .release = spandsp_fax_gw_gen_release, @@ -782,7 +782,7 @@ static int spandsp_fax_gateway_start(struct ast_fax_session *s) { p->ist38 = 1; p->ast_t38_state = ast_channel_get_t38_state(s->chan); - if (!(peer = ast_bridged_channel(s->chan))) { + if (!(peer = ast_channel_bridge_peer(s->chan))) { ast_channel_unlock(s->chan); return -1; } |