mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-19 03:08:45 +00:00
Remember they have to be zero filled
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1257 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1538,7 +1538,7 @@ static int pbx_load_module(void)
|
|||||||
char *cxt, *ext, *pri, *appl, *data, *tc, *cidmatch;
|
char *cxt, *ext, *pri, *appl, *data, *tc, *cidmatch;
|
||||||
struct ast_context *con;
|
struct ast_context *con;
|
||||||
char *start, *end;
|
char *start, *end;
|
||||||
char realvalue[256] = "";
|
char realvalue[256];
|
||||||
|
|
||||||
cfg = ast_load(config);
|
cfg = ast_load(config);
|
||||||
if (cfg) {
|
if (cfg) {
|
||||||
@@ -1549,6 +1549,7 @@ static int pbx_load_module(void)
|
|||||||
"writeprotect"));
|
"writeprotect"));
|
||||||
v = ast_variable_browse(cfg, "globals");
|
v = ast_variable_browse(cfg, "globals");
|
||||||
while(v) {
|
while(v) {
|
||||||
|
memset(realvalue, 0, sizeof(realvalue));
|
||||||
pbx_substitute_variables_helper(NULL, v->value, realvalue, sizeof(realvalue) - 1);
|
pbx_substitute_variables_helper(NULL, v->value, realvalue, sizeof(realvalue) - 1);
|
||||||
pbx_builtin_setvar_helper(NULL, v->name, realvalue);
|
pbx_builtin_setvar_helper(NULL, v->name, realvalue);
|
||||||
v = v->next;
|
v = v->next;
|
||||||
@@ -1622,15 +1623,18 @@ static int pbx_load_module(void)
|
|||||||
free(tc);
|
free(tc);
|
||||||
} else fprintf(stderr,"Error strdup returned NULL in %s\n",__PRETTY_FUNCTION__);
|
} else fprintf(stderr,"Error strdup returned NULL in %s\n",__PRETTY_FUNCTION__);
|
||||||
} else if(!strcasecmp(v->name, "include")) {
|
} else if(!strcasecmp(v->name, "include")) {
|
||||||
|
memset(realvalue, 0, sizeof(realvalue));
|
||||||
pbx_substitute_variables_helper(NULL, v->value, realvalue, sizeof(realvalue) - 1);
|
pbx_substitute_variables_helper(NULL, v->value, realvalue, sizeof(realvalue) - 1);
|
||||||
if (ast_context_add_include2(con, realvalue, registrar))
|
if (ast_context_add_include2(con, realvalue, registrar))
|
||||||
ast_log(LOG_WARNING, "Unable to include context '%s' in context '%s'\n", v->value, cxt);
|
ast_log(LOG_WARNING, "Unable to include context '%s' in context '%s'\n", v->value, cxt);
|
||||||
} else if(!strcasecmp(v->name, "ignorepat")) {
|
} else if(!strcasecmp(v->name, "ignorepat")) {
|
||||||
|
memset(realvalue, 0, sizeof(realvalue));
|
||||||
pbx_substitute_variables_helper(NULL, v->value, realvalue, sizeof(realvalue) - 1);
|
pbx_substitute_variables_helper(NULL, v->value, realvalue, sizeof(realvalue) - 1);
|
||||||
if (ast_context_add_ignorepat2(con, realvalue, registrar))
|
if (ast_context_add_ignorepat2(con, realvalue, registrar))
|
||||||
ast_log(LOG_WARNING, "Unable to include ignorepat '%s' in context '%s'\n", v->value, cxt);
|
ast_log(LOG_WARNING, "Unable to include ignorepat '%s' in context '%s'\n", v->value, cxt);
|
||||||
} else if (!strcasecmp(v->name, "switch")) {
|
} else if (!strcasecmp(v->name, "switch")) {
|
||||||
char *stringp=NULL;
|
char *stringp=NULL;
|
||||||
|
memset(realvalue, 0, sizeof(realvalue));
|
||||||
pbx_substitute_variables_helper(NULL, v->value, realvalue, sizeof(realvalue) - 1);
|
pbx_substitute_variables_helper(NULL, v->value, realvalue, sizeof(realvalue) - 1);
|
||||||
tc = realvalue;
|
tc = realvalue;
|
||||||
stringp=tc;
|
stringp=tc;
|
||||||
|
Reference in New Issue
Block a user