diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 6f46fa75ac69175aaf543487e2f2e47a02c965f9..e675b3e71c9d2d2a5d21248fe96a510c10a3c66e 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);