Skip to content
Snippets Groups Projects
Commit 61d40b74 authored by Richard Mudgett's avatar Richard Mudgett
Browse files

chan_dahdi: Don't ignore setvar when using configuration section scheme.

When the configuration section scheme of chan_dahdi.conf is used (keyword
dahdichan instead of channel) all setvar= options are completely ignored.
No variable defined this way appears in the created DAHDI channels.

* Move the clearing of setvar values to after the deferred processing of
dahdichan.

AST-1378 #close
Reported by: Guenther Kelleter
Patch by: Guenther Kelleter
........

Merged revisions 429825 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/11.6@429831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent d2ac3e5b
Branches
Tags
No related merge requests found
...@@ -18577,12 +18577,6 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct ...@@ -18577,12 +18577,6 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct
ast_log(LOG_WARNING, "Ignoring any changes to '%s' (on reload) at line %d.\n", v->name, v->lineno); ast_log(LOG_WARNING, "Ignoring any changes to '%s' (on reload) at line %d.\n", v->name, v->lineno);
} }
   
/* Since confp has already filled invidual dahdi_pvt objects with channels at this point, clear the variables in confp's pvt. */
if (confp->chan.vars) {
ast_variables_destroy(confp->chan.vars);
confp->chan.vars = NULL;
}
if (dahdichan) { if (dahdichan) {
/* Process the deferred dahdichan value. */ /* Process the deferred dahdichan value. */
if (build_channels(confp, dahdichan->value, reload, dahdichan->lineno, if (build_channels(confp, dahdichan->value, reload, dahdichan->lineno,
...@@ -18597,6 +18591,15 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct ...@@ -18597,6 +18591,15 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct
} }
} }
   
/*
* Since confp has already filled individual dahdi_pvt objects with channels
* at this point, clear the variables in confp's pvt.
*/
if (confp->chan.vars) {
ast_variables_destroy(confp->chan.vars);
confp->chan.vars = NULL;
}
/* mark the first channels of each DAHDI span to watch for their span alarms */ /* mark the first channels of each DAHDI span to watch for their span alarms */
for (tmp = iflist, y=-1; tmp; tmp = tmp->next) { for (tmp = iflist, y=-1; tmp; tmp = tmp->next) {
if (!tmp->destroy && tmp->span != y) { if (!tmp->destroy && tmp->span != y) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment