From 1ba963031b5f549739d373dbd0b704417fde7c7b Mon Sep 17 00:00:00 2001 From: russell Date: Thu, 5 Jul 2007 23:59:22 +0000 Subject: Fix a crash in chan_sip. Don't try to stop the monitor thread if it was never started. (closes issue #10124, reported by gzero, fixed by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@73598 f38db490-d61c-443f-a65b-d21fe96a405b --- channels/chan_sip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 789bb1bc0..2585d5368 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -17642,7 +17642,7 @@ static int unload_module(void) ast_mutex_unlock(&iflock); ast_mutex_lock(&monlock); - if (monitor_thread && (monitor_thread != AST_PTHREADT_STOP)) { + if (monitor_thread && (monitor_thread != AST_PTHREADT_STOP) && (monitor_thread != AST_PTHREADT_NULL)) { pthread_cancel(monitor_thread); pthread_kill(monitor_thread, SIGURG); pthread_join(monitor_thread, NULL); -- cgit v1.2.3