Don't attempt to proceed if our internal parser indicates an invalid file.
[asterisk/asterisk.git] / main / config.c
index 24c23d6..9527baa 100644 (file)
@@ -1902,7 +1902,9 @@ int read_config_maps(void)
        configtmp = ast_config_new();
        configtmp->max_include_level = 1;
        config = ast_config_internal_load(extconfig_conf, configtmp, flags, "", "extconfig");
-       if (!config) {
+       if (config == CONFIG_STATUS_FILEINVALID) {
+               return -1;
+       } else if (!config) {
                ast_config_destroy(configtmp);
                return 0;
        }