aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--channels/chan_iax2.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 5cc34ee77..d44fb0420 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -7895,15 +7895,12 @@ static void *iax2_process_thread(void *data)
/* Someone grabbed our thread *right* after we timed out.
* Wait for them to set us up with something to do and signal
* us to continue. */
- ast_cond_timedwait(&thread->cond, &thread->lock, &ts);
- ast_mutex_unlock(&thread->lock);
+ ast_cond_wait(&thread->cond, &thread->lock);
}
- if (!t)
- ast_mutex_unlock(&thread->lock);
} else {
ast_cond_wait(&thread->cond, &thread->lock);
- ast_mutex_unlock(&thread->lock);
}
+ ast_mutex_unlock(&thread->lock);
/* Add ourselves to the active list now */
AST_LIST_LOCK(&active_list);