aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_smdi.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-27 15:58:28 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-27 15:58:28 +0000
commitcef3c952a97b224a5d5fa894699813e2f30d0f70 (patch)
treea0bc576c15a6c8764ba5368244e2dd844e07c6fd /res/res_smdi.c
parent2c90b313b8e98f21c04fd9c8c69e52ca054fd13c (diff)
Merged revisions 104536 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r104536 | file | 2008-02-27 11:52:02 -0400 (Wed, 27 Feb 2008) | 4 lines 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/trunk@104537 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_smdi.c')
-rw-r--r--res/res_smdi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/res/res_smdi.c b/res/res_smdi.c
index 3a8a5f4d6..bd3170ee8 100644
--- a/res/res_smdi.c
+++ b/res/res_smdi.c
@@ -1274,7 +1274,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);