From: Mark Spencer Date: Sat, 11 Feb 2006 07:05:49 +0000 (+0000) Subject: Fix SMDI to not blow up asterisk when there's no config file. X-Git-Tag: 1.4.0-beta1~2679 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7dc0bdf35bd5fc1180a0f067385230add6f4113d;p=thirdparty%2Fasterisk.git Fix SMDI to not blow up asterisk when there's no config file. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9506 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_smdi.c b/res/res_smdi.c index 334f640bed..274e9a0fb7 100644 --- a/res/res_smdi.c +++ b/res/res_smdi.c @@ -540,8 +540,11 @@ static int smdi_load(int reload) conf = ast_config_load(config_file); if (!conf) { - ast_log(LOG_ERROR, "Unable to load config %s\n", config_file); - return -1; + if (reload) + ast_log(LOG_NOTICE, "Unable to reload config %s: SMDI untouched\n", config_file); + else + ast_log(LOG_NOTICE, "Unable to load config %s: SMDI disabled\n", config_file); + return 1; } /* Mark all interfaces that we are listening on. We will unmark them