[dahdi-commits] sruffell: linux/trunk r9604 - in /linux/trunk: drivers/dahdi/ include/dahdi/
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Mon Jan 3 18:27:57 UTC 2011
Author: sruffell
Date: Mon Jan 3 12:27:53 2011
New Revision: 9604
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9604
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.
Signed-off-by: Shaun Ruffell <sruffell at digium.com>
Acked-by: Kinsey Moore <kmoore at digium.com>
Modified:
linux/trunk/drivers/dahdi/dahdi-base.c
linux/trunk/include/dahdi/kernel.h
Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=9604&r1=9603&r2=9604
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Mon Jan 3 12:27:53 2011
@@ -2117,6 +2117,7 @@
pos->_confn = 0;
pos->confmode = 0;
pos->dacs_chan = NULL;
+ pos->conf_chan = NULL;
}
}
chan->channo = -1;
@@ -2719,6 +2720,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;
@@ -5022,6 +5024,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);
@@ -5823,6 +5826,7 @@
/* initialize conference variables */
chan->_confn = 0;
chan->confna = 0;
+ chan->conf_chan = NULL;
dahdi_disable_dacs(chan);
chan->confmode = 0;
chan->confmute = 0;
@@ -6627,8 +6631,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 */
@@ -7696,7 +7700,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/trunk/include/dahdi/kernel.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/include/dahdi/kernel.h?view=diff&rev=9604&r1=9603&r2=9604
==============================================================================
--- linux/trunk/include/dahdi/kernel.h (original)
+++ linux/trunk/include/dahdi/kernel.h Mon Jan 3 12:27:53 2011
@@ -517,6 +517,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 dahdi-commits
mailing list