}
if (tmp) {
+ /* If there are variables in tmp before it is updated to match the new config, clear them */
+ if (reloading && tmp->vars) {
+ ast_variables_destroy(tmp->vars);
+ tmp->vars = NULL;
+ }
+
int chan_sig = conf->chan.sig;
if (!here) {
if ((channel != CHAN_PSEUDO) && !pri) {
} else if (!(options & PROC_DAHDI_OPT_NOWARN) )
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[0]) {
/* The user has set 'dahdichan' */
/*< \todo pass proper line number instead of 0 */