diff options
author | twilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-19 19:25:14 +0000 |
---|---|---|
committer | twilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-19 19:25:14 +0000 |
commit | f93ebdba02a7563314d5417a63a7e2de516663c1 (patch) | |
tree | d96fa0b3cb5fba3fb499b6f6faf3fd29f768cc8d /channels/chan_usbradio.c | |
parent | 84d63d33cab0213edc53a79bfae943c0fe38a252 (diff) |
Fix checking for CONFIG_STATUS_FILEINVALID so that modules don't crash upon trying to parse an invalid config
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@157818 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_usbradio.c')
-rw-r--r-- | channels/chan_usbradio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/channels/chan_usbradio.c b/channels/chan_usbradio.c index bc1dbb3c2..df5bad541 100644 --- a/channels/chan_usbradio.c +++ b/channels/chan_usbradio.c @@ -3510,7 +3510,7 @@ static struct chan_usbradio_pvt *store_config(struct ast_config *cfg, char *ctg) o->txctcssadj = 200; o->rxsquelchadj = 500; o->devstr[0] = 0; - if (cfg1) { + if (cfg1 && cfg1 != CONFIG_STATUS_FILEINVALID) { for (v = ast_variable_browse(cfg1, o->name); v; v = v->next) { M_START((char *)v->name, (char *)v->value); @@ -3942,9 +3942,9 @@ static int load_module(void) /* load config file */ #ifdef NEW_ASTERISK - if (!(cfg = ast_config_load(config,zeroflag))) { + if (!(cfg = ast_config_load(config,zeroflag)) || cfg == CONFIG_STATUS_FILEINVALID) { #else - if (!(cfg = ast_config_load(config))) { + if (!(cfg = ast_config_load(config))) || cfg == CONFIG_STATUS_FILEINVALID { #endif ast_log(LOG_NOTICE, "Unable to load config %s\n", config); return AST_MODULE_LOAD_DECLINE; |