diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-09-29 16:23:13 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-09-29 16:23:13 +0000 |
commit | 5d91a043f4d0c55ec1d1dbd08942387465ae9ccb (patch) | |
tree | 280934276af83536511ec8384246d627e05c58a6 /drivers/dahdi/xpp/xpp_dahdi.c | |
parent | 3f652d418dd89b1a4b84923afe9ee84b21d0e7e0 (diff) |
xpp: make card_hooksig an optional card method.
Done in preperation for T1 CAS support, as the PRI module will use RBS
instead.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7244 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/xpp/xpp_dahdi.c')
-rw-r--r-- | drivers/dahdi/xpp/xpp_dahdi.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/dahdi/xpp/xpp_dahdi.c b/drivers/dahdi/xpp/xpp_dahdi.c index 9be1e4d..16333fc 100644 --- a/drivers/dahdi/xpp/xpp_dahdi.c +++ b/drivers/dahdi/xpp/xpp_dahdi.c @@ -940,6 +940,12 @@ static int xpp_hooksig(struct dahdi_chan *chan, enum dahdi_txsig txsig) __FUNCTION__, pos); return -ENODEV; } + if(!xpd->xops->card_hooksig) { + LINE_ERR(xpd, pos, + "%s: No hooksig method for this channel. Ignore.\n", + __FUNCTION__); + return -ENODEV; + } xbus = xpd->xbus; BUG_ON(!xbus); DBG(SIGNAL, "Setting %s to %s (%d)\n", chan->name, txsig2str(txsig), txsig); @@ -1082,7 +1088,8 @@ int dahdi_register_xpd(xpd_t *xpd) span->open = xpp_open; span->close = xpp_close; span->flags = DAHDI_FLAG_RBS; - span->hooksig = xpp_hooksig; /* Only with RBS bits */ + if(xops->card_hooksig) + span->hooksig = xpp_hooksig; /* Only with RBS bits */ span->ioctl = xpp_ioctl; span->maint = xpp_maint; /* |