Author: bebuild
Date: Fri Dec 19 14:37:24 2014
New Revision: 429860

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=429860
Log:
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
........

Merged revisions 429829 from http://svn.asterisk.org/svn/asterisk/branches/13

Modified:
    certified/branches/13.1/   (props changed)
    certified/branches/13.1/channels/chan_dahdi.c

Propchange: certified/branches/13.1/
------------------------------------------------------------------------------
--- branch-13-merged (original)
+++ branch-13-merged Fri Dec 19 14:37:24 2014
@@ -1,1 +1,1 @@
-/branches/13:429540,429571
+/branches/13:429540,429571,429829

Modified: certified/branches/13.1/channels/chan_dahdi.c
URL: 
http://svnview.digium.com/svn/asterisk/certified/branches/13.1/channels/chan_dahdi.c?view=diff&rev=429860&r1=429859&r2=429860
==============================================================================
--- certified/branches/13.1/channels/chan_dahdi.c (original)
+++ certified/branches/13.1/channels/chan_dahdi.c Fri Dec 19 14:37:24 2014
@@ -18925,12 +18925,6 @@
                        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) {
                /* Process the deferred dahdichan value. */
                if (build_channels(confp, dahdichan->value, reload, 
dahdichan->lineno)) {
@@ -18942,6 +18936,15 @@
                                return -1;
                        }
                }
+       }
+
+       /*
+        * 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 */


-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

svn-commits mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/svn-commits

Reply via email to