]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't crash if something happens when setting up an SMDI interface and it gets
authorRussell Bryant <russell@russellbryant.com>
Mon, 7 Jan 2008 16:39:23 +0000 (16:39 +0000)
committerRussell Bryant <russell@russellbryant.com>
Mon, 7 Jan 2008 16:39:23 +0000 (16:39 +0000)
destroyed before the SMDI port handling thread gets created.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@96884 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_smdi.c

index 4572dc3edba74804a22298dd95c35b039ef99edd..e11990466c6025740770072ca5d0d6bb8807b00e 100644 (file)
@@ -626,6 +626,8 @@ static int smdi_load(int reload)
 
                        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);