From: Jeremy McNamara Date: Mon, 12 Jan 2004 06:10:54 +0000 (+0000) Subject: fix monitor thread. Bug #726 X-Git-Tag: 0.7.0~36 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e08cce6b6b1ba847a8efd2ad49b706db74e4459f;p=thirdparty%2Fasterisk.git fix monitor thread. Bug #726 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1976 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_zap.c b/channels/chan_zap.c index 56ccea1cdb..80e4fec81b 100755 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -7048,7 +7048,7 @@ static int __unload_module(void) return -1; } if (!ast_mutex_lock(&monlock)) { - if (monitor_thread) { + if (monitor_thread && (monitor_thread != -2)) { pthread_cancel(monitor_thread); pthread_kill(monitor_thread, SIGURG); pthread_join(monitor_thread, NULL);