From: Russell Bryant Date: Thu, 5 Jul 2007 23:59:50 +0000 (+0000) Subject: Merged revisions 73598 via svnmerge from X-Git-Tag: 1.6.0-beta1~3^2~2141 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=134a556c9fc6afc4eadd1f1a438b293669e989b0;p=thirdparty%2Fasterisk.git Merged revisions 73598 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r73598 | russell | 2007-07-05 18:59:22 -0500 (Thu, 05 Jul 2007) | 3 lines 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: https://origsvn.digium.com/svn/asterisk/trunk@73599 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index fc9937eaaf..ee68902b56 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -18460,7 +18460,7 @@ static int unload_module(void) dialoglist_unlock(); 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);