[svn-commits] kpfleming: linux/trunk r4653 - /linux/trunk/drivers/dahdi/dahdi-base.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Aug 1 18:07:28 CDT 2008


Author: kpfleming
Date: Fri Aug  1 18:07:28 2008
New Revision: 4653

URL: http://svn.digium.com/view/dahdi?view=rev&rev=4653
Log:
use correct logic to handle a slave channel being removed from a master channel, so if the master channel itself is not reconfigured it will still end up properly linking to any remaining slaves

(closes issue #11611)
Reported by: richvdh
Tested by: tzafrir

Modified:
    linux/trunk/drivers/dahdi/dahdi-base.c

Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=4653&r1=4652&r2=4653
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Fri Aug  1 18:07:28 2008
@@ -3715,9 +3715,13 @@
 			res = chans[ch.chan]->span->chanconfig(chans[ch.chan], ch.sigtype);
 
 		if (chans[ch.chan]->master) {
+			struct dahdi_chan *oldmaster = chans[ch.chan]->master;
+
 			/* Clear the master channel */
-			recalc_slaves(chans[ch.chan]->master);
+			chans[ch.chan]->master = 0;
 			chans[ch.chan]->nextslave = 0;
+			/* Unlink this channel from the master's channel list */
+			recalc_slaves(oldmaster);
 		}
 
 		if (!res) {




More information about the svn-commits mailing list