[dahdi-commits] sruffell: linux/trunk r9120 - /linux/trunk/drivers/dahdi/dahdi-base.c
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Tue Aug 10 17:08:05 CDT 2010
Author: sruffell
Date: Tue Aug 10 17:08:02 2010
New Revision: 9120
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9120
Log:
dahdi: Fix oops when trying to dacs channels with a null dacs function.
Modified:
linux/trunk/drivers/dahdi/dahdi-base.c
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=9120&r1=9119&r2=9120
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Tue Aug 10 17:08:02 2010
@@ -511,11 +511,14 @@
static int dahdi_chan_dacs(struct dahdi_chan *chan1, struct dahdi_chan *chan2)
{
if (chan2) {
- if (chan1->span && chan2->span &&
- (chan1->span->ops->dacs == chan2->span->ops->dacs))
+ if (chan1->span && chan2->span && chan1->span->ops->dacs &&
+ (chan1->span->ops->dacs == chan2->span->ops->dacs)) {
return chan1->span->ops->dacs(chan1, chan2);
- else
+ } else {
+ module_printk(KERN_ERR, "Unable cross connect '%s' "
+ "with '%s'\n", chan2->name, chan1->name);
return -ENOSYS;
+ }
} else {
if (chan1->span && chan1->span->ops->dacs)
return chan1->span->ops->dacs(chan1, NULL);
@@ -4309,9 +4312,10 @@
/* Setup conference properly */
chans[ch.chan]->confmode = DAHDI_CONF_DIGITALMON;
chans[ch.chan]->confna = ch.idlebits;
- dahdi_chan_dacs(chans[ch.chan], chans[ch.idlebits]);
+ res = dahdi_chan_dacs(chans[ch.chan],
+ chans[ch.idlebits]);
} else {
- dahdi_chan_dacs(chans[ch.chan], NULL);
+ res = dahdi_chan_dacs(chans[ch.chan], NULL);
}
chans[ch.chan]->master = newmaster;
/* Note new slave if we are not our own master */
More information about the dahdi-commits
mailing list