[asterisk-commits] jrose: trunk r313437 - in /trunk: ./ channels/chan_dahdi.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Apr 12 13:50:16 CDT 2011


Author: jrose
Date: Tue Apr 12 13:50:11 2011
New Revision: 313437

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=313437
Log:
Merged revisions 313435 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r313435 | jrose | 2011-04-12 13:44:44 -0500 (Tue, 12 Apr 2011) | 1 line
  
  fixing stupid mistake with putting code before variable declaration
........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_dahdi.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: trunk/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_dahdi.c?view=diff&rev=313437&r1=313436&r2=313437
==============================================================================
--- trunk/channels/chan_dahdi.c (original)
+++ trunk/channels/chan_dahdi.c Tue Apr 12 13:50:11 2011
@@ -12137,6 +12137,12 @@
 
 	if (tmp) {
 		int chan_sig = conf->chan.sig;
+
+		/* 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;
+		}
 
 		if (!here) {
 			/* Can only get here if this is a new channel interface being created. */
@@ -17817,6 +17823,13 @@
 		} 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 */




More information about the asterisk-commits mailing list