diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-01-30 15:03:20 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-01-30 15:03:20 +0000 |
commit | a8282b50e1826df08d77e3989b637814415b5865 (patch) | |
tree | 03c27ab3cc019e3323dea0a3464f071a18fa1d18 /config.c | |
parent | 3e152dc0f17e3948a6d3945f203f62060f987c17 (diff) |
Version 0.3.0 from FTP
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@593 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'config.c')
-rwxr-xr-x | config.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -20,6 +20,7 @@ #include <asterisk/options.h> #include <asterisk/logger.h> #include "asterisk.h" +#include "astconf.h" #define MAX_INCLUDE_LEVEL 10 @@ -228,6 +229,8 @@ static int cfg_process(struct ast_config *tmp, struct ast_category **_tmpc, stru if (!*_tmpc) { ast_log(LOG_WARNING, "parse error: No category context for line %d of %s\n", lineno, configfile); + ast_destroy(tmp); + return -1; } c = strchr(cur, '='); if (c) { @@ -272,7 +275,7 @@ static struct ast_config *__ast_load(char *configfile, struct ast_config *tmp, s if (configfile[0] == '/') { strncpy(fn, configfile, sizeof(fn)-1); } else { - snprintf(fn, sizeof(fn), "%s/%s", AST_CONFIG_DIR, configfile); + snprintf(fn, sizeof(fn), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, configfile); } if ((option_verbose > 1) && !option_debug) { ast_verbose( VERBOSE_PREFIX_2 "Parsing '%s': ", fn); |