mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Fix some race conditions that cause ast_assert() to report that chan_iax2 tried
to remove an entry that wasn't in the scheduler git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@122259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1010,10 +1010,19 @@ static void __send_ping(const void *data)
|
||||
|
||||
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 void __send_lagrq(const void *data)
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user