[asterisk-commits] murf: branch 1.6.1 r178869 - in /branches/1.6.1: ./ main/features.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Feb 26 11:38:22 CST 2009
Author: murf
Date: Thu Feb 26 11:38:16 2009
New Revision: 178869
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=178869
Log:
Merged revisions 178828 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r178828 | murf | 2009-02-26 10:22:11 -0700 (Thu, 26 Feb 2009) | 34 lines
Merged revisions 178804 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r178804 | murf | 2009-02-26 10:09:03 -0700 (Thu, 26 Feb 2009) | 28 lines
This patch prevents the feature detection timeout from being cut in half.
Because the ast_channel_bridge() call will return 0 and pass
a frame pointer for both DTMF_BEGIN and DTMF_END, the feature_timer
field in hte config struct is getting decremented twice, which
effectively cuts the digittimeout in half. I added conditions
to the if statement to only let DTMF_END frames to flow thru,
which solved the problem. Also, when the frame pointer is null,
let control flow thru-- this usually happens on timeouts. I added
a comment to the code to explain what's going on and why.
Many thanks to sodom for reporting this problem. Personnally, it always seemed
like something was wrong with the featuredigittimeout, but I never
could quite decide what... and was too busy to investigate.
This bug forced the issue, and now we know.
Sodom had other issues in 14515, but I couldn't reproduce them. If
he still has problems, and wants to get them solved, he is welcome
to reopen 14515.
(closes issue #14515)
Reported by: sodom
Patches:
14515.patch uploaded by murf (license 17)
Tested by: murf, sodom
........
................
Modified:
branches/1.6.1/ (props changed)
branches/1.6.1/main/features.c
Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.1/main/features.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.1/main/features.c?view=diff&rev=178869&r1=178868&r2=178869
==============================================================================
--- branches/1.6.1/main/features.c (original)
+++ branches/1.6.1/main/features.c Thu Feb 26 11:38:16 2009
@@ -2460,8 +2460,15 @@
struct ast_channel *other; /* used later */
res = ast_channel_bridge(chan, peer, config, &f, &who);
-
- if (config->feature_timer) {
+
+ /* When frame is not set, we are probably involved in a situation
+ where we've timed out.
+ When frame is set, we'll come this code twice; once for DTMF_BEGIN
+ and also for DTMF_END. If we flow into the following 'if' for both, then
+ our wait times are cut in half, as both will subtract from the
+ feature_timer. Not good!
+ */
+ if (config->feature_timer && (!f || f->frametype == AST_FRAME_DTMF_END)) {
/* Update time limit for next pass */
diff = ast_tvdiff_ms(ast_tvnow(), config->start_time);
if (res == AST_BRIDGE_RETRY) {
More information about the asterisk-commits
mailing list