if(!ast_strlen_zero(exec_file))
unlink(exec_file);
if(!do_include)
if(!ast_strlen_zero(exec_file))
unlink(exec_file);
if(!do_include)
} else {
ast_log(LOG_WARNING, "Directive '#%s' needs an argument (%s) at line %d of %s\n",
} else {
ast_log(LOG_WARNING, "Directive '#%s' needs an argument (%s) at line %d of %s\n",
int lineno=0;
int comment = 0, nest[MAX_NESTED_COMMENTS];
struct ast_category *cat = NULL;
int lineno=0;
int comment = 0, nest[MAX_NESTED_COMMENTS];
struct ast_category *cat = NULL;
cat = ast_config_get_current_category(cfg);
cat = ast_config_get_current_category(cfg);
fflush(stdout);
}
if ((f = fopen(fn, "r"))) {
fflush(stdout);
}
if ((f = fopen(fn, "r"))) {
if (option_debug)
ast_log(LOG_DEBUG, "Parsing %s\n", fn);
else if (option_verbose > 1)
if (option_debug)
ast_log(LOG_DEBUG, "Parsing %s\n", fn);
else if (option_verbose > 1)
+ if (count == 0)
+ return NULL;
void read_config_maps(void)
{
void read_config_maps(void)
{
- struct ast_config *config;
+ struct ast_config *config, *configtmp;
struct ast_variable *v;
char *driver, *table, *database, *stringp;
clear_config_maps();
struct ast_variable *v;
char *driver, *table, *database, *stringp;
clear_config_maps();
- config = ast_config_new();
- config->max_include_level = 1;
- config = ast_config_internal_load(extconfig_conf, config);
- if (!config)
+ configtmp = ast_config_new();
+ configtmp->max_include_level = 1;
+ config = ast_config_internal_load(extconfig_conf, configtmp);
+ if (!config) {
+ ast_config_destroy(configtmp);
for (v = ast_variable_browse(config, "settings"); v; v = v->next) {
stringp = v->value;
for (v = ast_variable_browse(config, "settings"); v; v = v->next) {
stringp = v->value;