diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-01-07 16:39:23 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-01-07 16:39:23 +0000 |
commit | b8d50f669949716d40db2256d54093ba15212ed5 (patch) | |
tree | fd6fd54d43ed70948a2fbf28bbeeaf1f27250f71 /res | |
parent | f582d867b6d580c0795517e5be66e6768c5ff270 (diff) |
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: http://svn.digium.com/svn/asterisk/branches/1.4@96884 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r-- | res/res_smdi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/res/res_smdi.c b/res/res_smdi.c index 4572dc3ed..e11990466 100644 --- a/res/res_smdi.c +++ b/res/res_smdi.c @@ -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); |