]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
We need to lock the pvt structure during retransmission as another worker thread...
authorJoshua Colp <jcolp@digium.com>
Mon, 30 Oct 2006 18:13:07 +0000 (18:13 +0000)
committerJoshua Colp <jcolp@digium.com>
Mon, 30 Oct 2006 18:13:07 +0000 (18:13 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@46474 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index e2a0feddc0e2e6caf058eac6a92649afaf14213a..e51ccafc7c6c9fb5c19c985aff098cfe2e0224fe 100644 (file)
@@ -8060,11 +8060,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);