diff options
Diffstat (limited to 'pbx')
-rwxr-xr-x | pbx/pbx_config.c | 4 | ||||
-rwxr-xr-x | pbx/pbx_spool.c | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/pbx/pbx_config.c b/pbx/pbx_config.c index b067e2fe4..378dd078c 100755 --- a/pbx/pbx_config.c +++ b/pbx/pbx_config.c @@ -1687,6 +1687,7 @@ static int pbx_load_module(void) else data = ""; } + pbx_substitute_variables_helper(NULL, ext, realext, sizeof(realext)-1); cidmatch = strchr(ext, '/'); if (cidmatch) { *cidmatch = '\0'; @@ -1698,8 +1699,9 @@ static int pbx_load_module(void) if (!data) data=""; while(*appl && (*appl < 33)) appl++; - pbx_substitute_variables_helper(NULL, ext, realext, sizeof(realext) - 1); if (ipri) { + if (!strcmp(realext, "_.")) + ast_log(LOG_WARNING, "The use of '_.' for an extension is strongly discouraged and can have unexpected behavior. Please use '_X.' instead at line %d\n", v->lineno); if (ast_add_extension2(con, 0, realext, ipri, cidmatch, appl, strdup(data), FREE, registrar)) { ast_log(LOG_WARNING, "Unable to register extension at line %d\n", v->lineno); } diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c index fd51926b0..fcf50c271 100755 --- a/pbx/pbx_spool.c +++ b/pbx/pbx_spool.c @@ -92,10 +92,8 @@ static int apply_outgoing(struct outgoing *o, char *fn, FILE *f) char buf[256]; char *c, *c2; int lineno = 0; - while(!feof(f)) { - fgets(buf, sizeof(buf), f); + while(fgets(buf, sizeof(buf), f)) { lineno++; - if (!feof(f)) { /* Trim comments */ c = buf; while ((c = strchr(c, '#'))) { @@ -184,7 +182,6 @@ static int apply_outgoing(struct outgoing *o, char *fn, FILE *f) } else ast_log(LOG_NOTICE, "Syntax error at line %d of %s\n", lineno, fn); } - } } strncpy(o->fn, fn, sizeof(o->fn) - 1); if (ast_strlen_zero(o->tech) || ast_strlen_zero(o->dest) || (ast_strlen_zero(o->app) && ast_strlen_zero(o->exten))) { |