[asterisk-commits] mmichelson: branch 1.6.0 r108290 - in /branches/1.6.0: ./ channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Mar 12 16:58:29 CDT 2008
Author: mmichelson
Date: Wed Mar 12 16:58:29 2008
New Revision: 108290
URL: http://svn.digium.com/view/asterisk?view=rev&rev=108290
Log:
Merged revisions 108289 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r108289 | mmichelson | 2008-03-12 16:57:41 -0500 (Wed, 12 Mar 2008) | 22 lines
Merged revisions 108288 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r108288 | mmichelson | 2008-03-12 16:53:46 -0500 (Wed, 12 Mar 2008) | 14 lines
Change AST_SCHED_DEL use to ast_sched_del for autocongestion in chan_sip.
The scheduler callback will always return 0. This means that this id
is never rescheduled, so it makes no sense to loop trying to delete
the id from the scheduler queue. If we fail to remove the item from the
queue once, it will fail every single time.
(Yes I realize that in this case, the macro would exit early because the
id is set to -1 in the callback, but it still makes no sense to use
that macro in favor of calling ast_sched_del once and being done with it)
This is the first of potentially several such fixes.
........
................
Modified:
branches/1.6.0/ (props changed)
branches/1.6.0/channels/chan_sip.c
Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.0/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/channels/chan_sip.c?view=diff&rev=108290&r1=108289&r2=108290
==============================================================================
--- branches/1.6.0/channels/chan_sip.c (original)
+++ branches/1.6.0/channels/chan_sip.c Wed Mar 12 16:58:29 2008
@@ -4182,7 +4182,8 @@
p->invitestate = INV_CALLING;
/* Initialize auto-congest time */
- AST_SCHED_REPLACE(p->initid, sched, p->timer_b, auto_congest, dialog_ref(p));
+ ast_sched_del(sched, p->initid);
+ p->initid = ast_sched_add(sched, p->maxtime ? (p->maxtime * 4) : SIP_TRANS_TIMEOUT, auto_congest, p);
}
return res;
@@ -4251,7 +4252,7 @@
if (p->stateid > -1)
ast_extension_state_del(p->stateid, NULL);
- AST_SCHED_DEL(sched, p->initid);
+ ast_sched_del(sched, p->initid);
AST_SCHED_DEL(sched, p->waitid);
AST_SCHED_DEL(sched, p->autokillid);
@@ -14452,7 +14453,7 @@
/* Acknowledge sequence number - This only happens on INVITE from SIP-call */
/* Don't auto congest anymore since we've gotten something useful back */
- AST_SCHED_DEL(sched, p->initid);
+ ast_sched_del(sched, p->initid);
/* RFC3261 says we must treat every 1xx response (but not 100)
that we don't recognize as if it was 183.
More information about the asterisk-commits
mailing list