aboutsummaryrefslogtreecommitdiffstats
path: root/utils/extconf.c
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-18 14:09:50 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-18 14:09:50 +0000
commit64b640a6f79d3f9120f2f05463f26ec881d085be (patch)
tree58c8202a302c0d8d8fba33c9967bc826f6ecd589 /utils/extconf.c
parentee49273d4ded2a7bfcc0d8c86969779e1192325b (diff)
Merged revisions 109309 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r109309 | murf | 2008-03-18 00:37:15 -0600 (Tue, 18 Mar 2008) | 17 lines (closes issue #11903) Reported by: atis Many thanks to atis for spotting this problem and reporting it. The fix was to straighten out how items are placed on and removed from the file stack. Regressions as well as the provided test case helped to straighten out all code paths. valgrind was used to make sure all memory allocated was freed. Sorry for not solving this earlier. I got distracted. Added the ntest23 regression test, which is mainly a copy of ntest22, but with a few juicy errors thrown in, to replicate the kind of error that atis spotted. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@109357 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'utils/extconf.c')
-rw-r--r--utils/extconf.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/utils/extconf.c b/utils/extconf.c
index 9903ff295..4ff6e1dc0 100644
--- a/utils/extconf.c
+++ b/utils/extconf.c
@@ -5520,20 +5520,18 @@ static int ast_findlabel_extension2(struct ast_channel *c, struct ast_context *c
return pbx_extension_helper(c, con, NULL, exten, 0, label, callerid, E_FINDLABEL);
}
-static struct ast_context *ast_context_find_or_create(struct ast_context **extcontexts, const char *name, const char *registrar)
+static struct ast_context *ast_context_find_or_create(struct ast_context **extcontexts, void *tab, const char *name, const char *registrar)
{
return __ast_context_create(extcontexts, name, registrar, 1);
}
-struct ast_context *localized_context_create(struct ast_context **extcontexts, const char *name, const char *registrar);
-
-struct ast_context *localized_context_create(struct ast_context **extcontexts, const char *name, const char *registrar)
+struct ast_context *localized_context_find_or_create(struct ast_context **extcontexts, void *tab, const char *name, const char *registrar);
+struct ast_context *localized_context_find_or_create(struct ast_context **extcontexts, void *tab, const char *name, const char *registrar)
{
- return __ast_context_create(extcontexts, name, registrar, 0);
+ return __ast_context_create(extcontexts, name, registrar, 1);
}
-
/* chopped this one off at the knees */
static int ast_func_read(struct ast_channel *chan, const char *function, char *workspace, size_t len)
{
@@ -5916,7 +5914,7 @@ static int pbx_load_config(const char *config_file)
/* All categories but "general" or "globals" are considered contexts */
if (!strcasecmp(cxt, "general") || !strcasecmp(cxt, "globals"))
continue;
- con=ast_context_find_or_create(&local_contexts,cxt, registrar);
+ con=ast_context_find_or_create(&local_contexts,NULL,cxt, registrar);
if (con == NULL)
continue;