[dahdi-commits] sruffell: linux/trunk r4990 - /linux/trunk/drivers/dahdi/dahdi-base.c
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Thu Sep 25 22:20:50 CDT 2008
Author: sruffell
Date: Thu Sep 25 22:20:49 2008
New Revision: 4990
URL: http://svn.digium.com/view/dahdi?view=rev&rev=4990
Log:
The channel master should not be set to 0, but rather should be 'cleared' by
setting the channel to be it's own master.
(related to issue 11611)
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=4990&r1=4989&r2=4990
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Thu Sep 25 22:20:49 2008
@@ -3838,11 +3838,11 @@
if (!res && chans[ch.chan]->span->chanconfig)
res = chans[ch.chan]->span->chanconfig(chans[ch.chan], ch.sigtype);
- if (chans[ch.chan]->master) {
+ if (chans[ch.chan]->master != chans[ch.chan]) {
struct dahdi_chan *oldmaster = chans[ch.chan]->master;
/* Clear the master channel */
- chans[ch.chan]->master = 0;
+ chans[ch.chan]->master = chans[ch.chan];
chans[ch.chan]->nextslave = 0;
/* Unlink this channel from the master's channel list */
recalc_slaves(oldmaster);
@@ -4878,6 +4878,7 @@
int oldconf;
void *rxgain=NULL;
+ WARN_ON(!chan->master);
if (!chan)
return -ENOSYS;
More information about the dahdi-commits
mailing list