[asterisk-commits] russell: branch 1.4 r96884 - /branches/1.4/res/res_smdi.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jan 7 10:39:24 CST 2008


Author: russell
Date: Mon Jan  7 10:39:23 2008
New Revision: 96884

URL: http://svn.digium.com/view/asterisk?view=rev&rev=96884
Log:
Don't crash if something happens when setting up an SMDI interface and it gets
destroyed before the SMDI port handling thread gets created.

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=96884&r1=96883&r2=96884
==============================================================================
--- branches/1.4/res/res_smdi.c (original)
+++ branches/1.4/res/res_smdi.c Mon Jan  7 10:39:23 2008
@@ -626,6 +626,8 @@
 
 			ast_copy_string(iface->name, v->value, sizeof(iface->name));
 
+			iface->thread = AST_PTHREADT_NULL;
+
 			if (!(iface->file = fopen(iface->name, "r"))) {
 				ast_log(LOG_ERROR, "Error opening SMDI interface %s (%s)\n", iface->name, strerror(errno));
 				ASTOBJ_UNREF(iface, ast_smdi_interface_destroy);




More information about the asterisk-commits mailing list