[svn-commits] sruffell: branch linux/sruffell/chan_list r9341 - in /linux/team/sruffell/cha...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Sep 17 14:11:50 CDT 2010


Author: sruffell
Date: Fri Sep 17 14:11:39 2010
New Revision: 9341

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9341
Log:
dahdi: Save pointer to monitored channel in struct dahdi_chan.

When we're in monitor mode, we can save a pointer to the channel we are
monitoring directly instead of dereferencing the 'chans' array each
time.

Modified:
    linux/team/sruffell/chan_list/drivers/dahdi/dahdi-base.c
    linux/team/sruffell/chan_list/include/dahdi/kernel.h

Modified: linux/team/sruffell/chan_list/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/linux/team/sruffell/chan_list/drivers/dahdi/dahdi-base.c?view=diff&rev=9341&r1=9340&r2=9341
==============================================================================
--- linux/team/sruffell/chan_list/drivers/dahdi/dahdi-base.c (original)
+++ linux/team/sruffell/chan_list/drivers/dahdi/dahdi-base.c Fri Sep 17 14:11:39 2010
@@ -2162,6 +2162,7 @@
 			pos->_confn = 0;
 			pos->confmode = 0;
 			pos->dacs_chan = NULL;
+			pos->conf_chan = NULL;
 		}
 	}
 	chan->channo = -1;
@@ -2755,6 +2756,7 @@
 	if ((chan->sig & __DAHDI_SIG_DACS) != __DAHDI_SIG_DACS) {
 		chan->confna = 0;
 		chan->confmode = 0;
+		chan->conf_chan = NULL;
 		dahdi_disable_dacs(chan);
 	}
 	chan->_confn = 0;
@@ -4972,6 +4974,7 @@
 	}
 	j = chan->confna;  /* save old conference number */
 	chan->confna = conf.confno;   /* set conference number */
+	chan->conf_chan = conf_chan;
 	chan->confmode = conf.confmode;  /* set conference mode */
 	chan->_confn = 0;		     /* Clear confn */
 	dahdi_check_conf(j);
@@ -5745,6 +5748,7 @@
 			  /* initialize conference variables */
 			chan->_confn = 0;
 			chan->confna = 0;
+			chan->conf_chan = NULL;
 			dahdi_disable_dacs(chan);
 			chan->confmode = 0;
 			chan->confmute = 0;
@@ -6568,8 +6572,8 @@
 #endif
 
 	if ((!ms->confmute && !ms->dialing) || (is_pseudo_chan(ms))) {
+		struct dahdi_chan *const conf_chan = ms->conf_chan;
 		/* Handle conferencing on non-clear channel and non-HDLC channels */
-		struct dahdi_chan *const conf_chan = chans[ms->confna];
 		switch(ms->confmode & DAHDI_CONF_MODE_MASK) {
 		case DAHDI_CONF_NORMAL:
 			/* Do nuffin */
@@ -7616,7 +7620,7 @@
 	/* Take the rxc, twiddle it for conferencing if appropriate and put it
 	   back */
 	if ((!ms->confmute && !ms->afterdialingtimer) || is_pseudo_chan(ms)) {
-		struct dahdi_chan *const conf_chan = chans[ms->confna];
+		struct dahdi_chan *const conf_chan = ms->conf_chan;
 		switch(ms->confmode & DAHDI_CONF_MODE_MASK) {
 		case DAHDI_CONF_NORMAL:		/* Normal mode */
 			/* Do nothing.  rx goes output */

Modified: linux/team/sruffell/chan_list/include/dahdi/kernel.h
URL: http://svnview.digium.com/svn/dahdi/linux/team/sruffell/chan_list/include/dahdi/kernel.h?view=diff&rev=9341&r1=9340&r2=9341
==============================================================================
--- linux/team/sruffell/chan_list/include/dahdi/kernel.h (original)
+++ linux/team/sruffell/chan_list/include/dahdi/kernel.h Fri Sep 17 14:11:39 2010
@@ -509,6 +509,7 @@
 	int		_confn;	/*! Actual conference number */
 	int		confmode;  /*! conference mode */
 	int		confmute; /*! conference mute mode */
+	struct dahdi_chan *conf_chan;
 
 	/* Incoming and outgoing conference chunk queues for
 	   communicating between DAHDI master time and




More information about the svn-commits mailing list