[asterisk-commits] russell: branch 1.4 r122259 - /branches/1.4/channels/chan_iax2.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jun 12 13:22:45 CDT 2008
Author: russell
Date: Thu Jun 12 13:22:44 2008
New Revision: 122259
URL: http://svn.digium.com/view/asterisk?view=rev&rev=122259
Log:
Fix some race conditions that cause ast_assert() to report that chan_iax2 tried
to remove an entry that wasn't in the scheduler
Modified:
branches/1.4/channels/chan_iax2.c
Modified: branches/1.4/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_iax2.c?view=diff&rev=122259&r1=122258&r2=122259
==============================================================================
--- branches/1.4/channels/chan_iax2.c (original)
+++ branches/1.4/channels/chan_iax2.c Thu Jun 12 13:22:44 2008
@@ -1010,10 +1010,19 @@
static int send_ping(const void *data)
{
+ int callno = (long) data;
+
+ ast_mutex_lock(&iaxsl[callno]);
+ if (iaxs[callno]) {
+ iaxs[callno]->pingid = -1;
+ }
+ ast_mutex_unlock(&iaxsl[callno]);
+
#ifdef SCHED_MULTITHREADED
if (schedule_action(__send_ping, data))
#endif
__send_ping(data);
+
return 0;
}
@@ -1050,10 +1059,19 @@
static int send_lagrq(const void *data)
{
+ int callno = (long) data;
+
+ ast_mutex_lock(&iaxsl[callno]);
+ if (iaxs[callno]) {
+ iaxs[callno]->lagid = -1;
+ }
+ ast_mutex_unlock(&iaxsl[callno]);
+
#ifdef SCHED_MULTITHREADED
if (schedule_action(__send_lagrq, data))
#endif
__send_lagrq(data);
+
return 0;
}
More information about the asterisk-commits
mailing list