diff options
author | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-05-27 17:09:25 +0000 |
---|---|---|
committer | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-05-27 17:09:25 +0000 |
commit | bf042a94a8a20bcbee237db04507d9902a06c99d (patch) | |
tree | 6bf00bf1e4f506b8c2496d31662813ce1c5330c9 /main/channel.c | |
parent | aabaa74201731b1b6178bf1a63dbe2b26eff7118 (diff) |
Fix broken attended transfers
The bridge was terminating immediately after the attended transfer was
completed. The problem was because upon reentering ast_channel_bridge
nexteventts was checked to see if it was set and if so could possibly
return AST_BRIDGE_COMPLETE.
(closes issue #15183)
Reported by: andrebarbosa
Tested by: andrebarbosa, tootai, loloski
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@197126 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/channel.c')
-rw-r--r-- | main/channel.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/main/channel.c b/main/channel.c index 837367f04..44bffd61d 100644 --- a/main/channel.c +++ b/main/channel.c @@ -4472,10 +4472,11 @@ static enum ast_bridge_result ast_generic_bridge(struct ast_channel *c0, struct ast_poll_channel_add(c0, c1); if (config->feature_timer > 0 && ast_tvzero(config->nexteventts)) { - /* nexteventts is not set when the bridge is not scheduled to - * break, so calculate when the bridge should possibly break + /* calculate when the bridge should possibly break * if a partial feature match timed out */ - config->nexteventts = ast_tvadd(ast_tvnow(), ast_samp2tv(config->feature_timer, 1000)); + config->partialfeature_timer = ast_tvadd(ast_tvnow(), ast_samp2tv(config->feature_timer, 1000)); + } else { + memset(&config->partialfeature_timer, 0, sizeof(config->partialfeature_timer)); } for (;;) { @@ -4505,8 +4506,8 @@ static enum ast_bridge_result ast_generic_bridge(struct ast_channel *c0, struct * to not break, leave the channel bridge when the feature timer * time has elapsed so the DTMF will be sent to the other side. */ - if (!ast_tvzero(config->nexteventts)) { - int diff = ast_tvdiff_ms(config->nexteventts, ast_tvnow()); + if (!ast_tvzero(config->partialfeature_timer)) { + int diff = ast_tvdiff_ms(config->partialfeature_timer, ast_tvnow()); if (diff <= 0) { res = AST_BRIDGE_RETRY; break; |