diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-10-30 18:13:07 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-10-30 18:13:07 +0000 |
commit | 7d0d7662d1e648bb19beac95a94e52536c7486c0 (patch) | |
tree | b36b7d09971458fee1dc3258589763dc1b4d403d /channels | |
parent | 961ed4851e33ad8ee83ceadd5910c03cfe338a44 (diff) |
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/branches/1.4@46474 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_iax2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index e2a0feddc..e51ccafc7 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -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); |