diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-05 23:59:22 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-05 23:59:22 +0000 |
commit | 1ba963031b5f549739d373dbd0b704417fde7c7b (patch) | |
tree | f715d21a2bdf0d29de1c698903328e74bf66e194 /channels | |
parent | 8643a6878ae8bb50f59934165fbcdfdd5b332cda (diff) |
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
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |