aboutsummaryrefslogtreecommitdiffstats
path: root/config.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-01-30 15:03:20 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-01-30 15:03:20 +0000
commita8282b50e1826df08d77e3989b637814415b5865 (patch)
tree03c27ab3cc019e3323dea0a3464f071a18fa1d18 /config.c
parent3e152dc0f17e3948a6d3945f203f62060f987c17 (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-xconfig.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/config.c b/config.c
index d758d7fac..114d6584a 100755
--- a/config.c
+++ b/config.c
@@ -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);