summaryrefslogtreecommitdiff
path: root/utils/extconf.c
diff options
context:
space:
mode:
authorSteve Murphy <murf@digium.com>2008-03-18 14:09:50 +0000
committerSteve Murphy <murf@digium.com>2008-03-18 14:09:50 +0000
commit4e29ae880698bd1c5d3bd36bb1ee5f74f64ff803 (patch)
tree58c8202a302c0d8d8fba33c9967bc826f6ecd589 /utils/extconf.c
parent0de4eba6402ece75a72b0d6d90c004e3d5568189 (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: https://origsvn.digium.com/svn/asterisk/trunk@109357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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;