[svn-commits] file: branch 1.4 r104536 - /branches/1.4/res/res_smdi.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Feb 27 09:52:02 CST 2008


Author: file
Date: Wed Feb 27 09:52:02 2008
New Revision: 104536

URL: http://svn.digium.com/view/asterisk?view=rev&rev=104536
Log:
Only stop the MWI monitor thread if it was actually started.
(closes issue #12086)
Reported by: francesco_r

Modified:
    branches/1.4/res/res_smdi.c

Modified: branches/1.4/res/res_smdi.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/res/res_smdi.c?view=diff&rev=104536&r1=104535&r2=104536
==============================================================================
--- branches/1.4/res/res_smdi.c (original)
+++ branches/1.4/res/res_smdi.c Wed Feb 27 09:52:02 2008
@@ -1281,7 +1281,9 @@
 	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);




More information about the svn-commits mailing list