[asterisk-commits] russell: branch 1.6.1 r140063 - in /branches/1.6.1: ./ channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Aug 26 11:11:24 CDT 2008
Author: russell
Date: Tue Aug 26 11:11:23 2008
New Revision: 140063
URL: http://svn.digium.com/view/asterisk?view=rev&rev=140063
Log:
Merged revisions 140061 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r140061 | russell | 2008-08-26 11:10:06 -0500 (Tue, 26 Aug 2008) | 14 lines
Merged revisions 140060 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r140060 | russell | 2008-08-26 11:07:58 -0500 (Tue, 26 Aug 2008) | 6 lines
Fix some bogus scheduler usage in chan_sip. This code used the return value
of a completely unrelated function to determine whether the scheduler should
be run or not. This would have caused the scheduler to not run in cases where
it should have. Also, leave a note about another scheduler issue that needs
to be addressed at some point.
........
................
Modified:
branches/1.6.1/ (props changed)
branches/1.6.1/channels/chan_sip.c
Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.1/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/channels/chan_sip.c?view=diff&rev=140063&r1=140062&r2=140063
==============================================================================
--- branches/1.6.1/channels/chan_sip.c (original)
+++ branches/1.6.1/channels/chan_sip.c Tue Aug 26 11:11:23 2008
@@ -19546,6 +19546,12 @@
dialog that was found and destroyed, probably because the list contents would change,
so we'd need to restart. This isn't the best thing to do with callbacks. */
+ /* XXX TODO The scheduler usage in this module does not have sufficient
+ * synchronization being done between running the scheduler and places
+ * scheduling tasks. As it is written, any scheduled item may not run
+ * any sooner than about 1 second, regardless of whether a sooner time
+ * was asked for. */
+
pthread_testcancel();
/* Wait for sched or io */
res = ast_sched_wait(sched);
@@ -19555,11 +19561,9 @@
if (res > 20)
ast_debug(1, "chan_sip: ast_io_wait ran %d all at once\n", res);
ast_mutex_lock(&monlock);
- if (res >= 0) {
- res = ast_sched_runq(sched);
- if (res >= 20)
- ast_debug(1, "chan_sip: ast_sched_runq ran %d all at once\n", res);
- }
+ res = ast_sched_runq(sched);
+ if (res >= 20)
+ ast_debug(1, "chan_sip: ast_sched_runq ran %d all at once\n", res);
ast_mutex_unlock(&monlock);
}
More information about the asterisk-commits
mailing list