summaryrefslogtreecommitdiff
path: root/res/res_features.c
diff options
context:
space:
mode:
authorJason Parker <jparker@digium.com>2007-10-02 18:59:39 +0000
committerJason Parker <jparker@digium.com>2007-10-02 18:59:39 +0000
commit81d927886b7b5f089e9c711ef5e551f9b340d6e0 (patch)
treefeb2155e9d99b07d439b539ae25c905538e7024a /res/res_features.c
parent5139a2f6f7ad4591123aff694241ff3a9e7a98ba (diff)
Merged revisions 84410 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 (closes issue #10821) ........ r84410 | qwell | 2007-10-02 13:52:55 -0500 (Tue, 02 Oct 2007) | 4 lines Finish up on transferee channel before return on failure. Issue 10821, patch by Ivan ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_features.c')
-rw-r--r--res/res_features.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/res/res_features.c b/res/res_features.c
index 71c5addb1..e45d02184 100644
--- a/res/res_features.c
+++ b/res/res_features.c
@@ -956,8 +956,11 @@ static int builtin_atxfer(struct ast_channel *chan, struct ast_channel *peer, st
return FEATURE_RETURN_SUCCESS;
}
- if (check_compat(transferer, newchan))
+ if (check_compat(transferer, newchan)) {
+ /* we do mean transferee here, NOT transferer */
+ finishup(transferee);
return -1;
+ }
memset(&bconfig,0,sizeof(struct ast_bridge_config));
ast_set_flag(&(bconfig.features_caller), AST_FEATURE_DISCONNECT);
ast_set_flag(&(bconfig.features_callee), AST_FEATURE_DISCONNECT);
@@ -970,8 +973,10 @@ static int builtin_atxfer(struct ast_channel *chan, struct ast_channel *peer, st
transferer->_softhangup = 0;
return FEATURE_RETURN_SUCCESS;
}
- if (check_compat(transferee, newchan))
+ if (check_compat(transferee, newchan)) {
+ finishup(transferee);
return -1;
+ }
ast_indicate(transferee, AST_CONTROL_UNHOLD);
if ((ast_autoservice_stop(transferee) < 0)
@@ -1061,8 +1066,10 @@ static int builtin_atxfer(struct ast_channel *chan, struct ast_channel *peer, st
return -1;
/* newchan is up, we should prepare transferee and bridge them */
- if (check_compat(transferee, newchan))
+ if (check_compat(transferee, newchan)) {
+ finishup(transferee);
return -1;
+ }
ast_indicate(transferee, AST_CONTROL_UNHOLD);
if ((ast_waitfordigit(transferee, 100) < 0)