aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-30 18:17:02 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-30 18:17:02 +0000
commit37e4b821041e754776ab444e337b6ba7df580908 (patch)
treea7f2587d7b92343c814822872142da69bdaf1400
parent93933037afc69e8565f043024d996ac9cb32316f (diff)
Merged revisions 46474 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r46474 | file | 2006-10-30 13:13:07 -0500 (Mon, 30 Oct 2006) | 2 lines We need to lock the pvt structure during retransmission as another worker thread may be doing something as well. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46475 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_iax2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 6f46fa75a..e675b3e71 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -8084,11 +8084,12 @@ static void *network_thread(void *ignore)
continue;
f->sentyet++;
- /* Send a copy immediately -- errors here are ok, so don't bother locking */
+ ast_mutex_lock(&iaxsl[f->callno]);
if (iaxs[f->callno]) {
send_packet(f);
count++;
}
+ ast_mutex_unlock(&iaxsl[f->callno]);
if (f->retries < 0) {
/* This is not supposed to be retransmitted */
AST_LIST_REMOVE(&iaxq.queue, f, list);