diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-02-27 15:52:02 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-02-27 15:52:02 +0000 |
commit | 36ca0034602098068a1e1311b29c4e469c8f29ce (patch) | |
tree | 5e67b9dd0e33f7536be7888b8efc702e8fea675d /res | |
parent | e4f4c008135dedc479a4eefc5063b9afb81ede40 (diff) |
Only stop the MWI monitor thread if it was actually started.
(closes issue #12086)
Reported by: francesco_r
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@104536 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r-- | res/res_smdi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/res/res_smdi.c b/res/res_smdi.c index 87a4dd49d..9315cf973 100644 --- a/res/res_smdi.c +++ b/res/res_smdi.c @@ -1281,7 +1281,9 @@ static int unload_module(void) ast_cond_signal(&mwi_monitor.cond); ast_mutex_unlock(&mwi_monitor.lock); - pthread_join(mwi_monitor.thread, NULL); + if (mwi_monitor.thread != AST_PTHREADT_NULL) { + pthread_join(mwi_monitor.thread, NULL); + } ast_custom_function_unregister(&smdi_msg_retrieve_function); ast_custom_function_unregister(&smdi_msg_function); |