mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-07 10:28:32 +00:00
Merged revisions 96884 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r96884 | russell | 2008-01-07 10:39:23 -0600 (Mon, 07 Jan 2008) | 3 lines Don't crash if something happens when setting up an SMDI interface and it gets destroyed before the SMDI port handling thread gets created. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@96885 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -615,6 +615,8 @@ static int smdi_load(int reload)
|
|||||||
|
|
||||||
ast_copy_string(iface->name, v->value, sizeof(iface->name));
|
ast_copy_string(iface->name, v->value, sizeof(iface->name));
|
||||||
|
|
||||||
|
iface->thread = AST_PTHREADT_NULL;
|
||||||
|
|
||||||
if (!(iface->file = fopen(iface->name, "r"))) {
|
if (!(iface->file = fopen(iface->name, "r"))) {
|
||||||
ast_log(LOG_ERROR, "Error opening SMDI interface %s (%s)\n", iface->name, strerror(errno));
|
ast_log(LOG_ERROR, "Error opening SMDI interface %s (%s)\n", iface->name, strerror(errno));
|
||||||
ASTOBJ_UNREF(iface, ast_smdi_interface_destroy);
|
ASTOBJ_UNREF(iface, ast_smdi_interface_destroy);
|
||||||
|
|||||||
Reference in New Issue
Block a user