[asterisk-commits] jpeeler: branch 1.4 r275665 - /branches/1.4/main/channel.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jul 12 11:58:48 CDT 2010
Author: jpeeler
Date: Mon Jul 12 11:58:39 2010
New Revision: 275665
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=275665
Log:
Change ast_write to not stop generator when called from ast_prod.
For SIP channels configured with the progressinband option on, the ringback was
being immediately stopped. This problem was due to ast_prod being moved for a
deadlock fix in 259858. Prodding the channel after setting up the generator
triggered the check in ast_write to stop the generator. The fix here should
write the frame the same as was done before the call to ast_prod was moved.
(closes issue #17372)
Reported by: tech_admin
Modified:
branches/1.4/main/channel.c
Modified: branches/1.4/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/main/channel.c?view=diff&rev=275665&r1=275664&r2=275665
==============================================================================
--- branches/1.4/main/channel.c (original)
+++ branches/1.4/main/channel.c Mon Jul 12 11:58:39 2010
@@ -2893,7 +2893,7 @@
ast_log(LOG_DEBUG, "Prodding channel '%s'\n", chan->name);
a.subclass = chan->rawwriteformat;
a.data = nothing + AST_FRIENDLY_OFFSET;
- a.src = "ast_prod";
+ a.src = "ast_prod"; /* this better match check in ast_write */
if (ast_write(chan, &a))
ast_log(LOG_WARNING, "Prodding channel '%s' failed\n", chan->name);
}
@@ -3044,10 +3044,10 @@
res = 0; /* XXX explain, why 0 ? */
goto done;
}
- if (chan->generatordata) {
- if (ast_test_flag(chan, AST_FLAG_WRITE_INT))
- ast_deactivate_generator(chan);
- else {
+ if (chan->generatordata && strcasecmp(fr->src, "ast_prod")) {
+ if (ast_test_flag(chan, AST_FLAG_WRITE_INT)) {
+ ast_deactivate_generator(chan);
+ } else {
if (fr->frametype == AST_FRAME_DTMF_END) {
/* There is a generator running while we're in the middle of a digit.
* It's probably inband DTMF, so go ahead and pass it so it can
More information about the asterisk-commits
mailing list