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 | |
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
-rw-r--r-- | drivers/dahdi/xpp/xpp_dahdi.c | 9 | ||||
-rw-r--r-- | drivers/dahdi/xpp/xproto.c | 1 |
2 files changed, 8 insertions, 2 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; /* diff --git a/drivers/dahdi/xpp/xproto.c b/drivers/dahdi/xpp/xproto.c index 70f82d5..4ae64f9 100644 --- a/drivers/dahdi/xpp/xproto.c +++ b/drivers/dahdi/xpp/xproto.c @@ -446,7 +446,6 @@ int xproto_register(const xproto_table_t *proto_table) CHECK_XOP(card_pcm_tospan); CHECK_XOP(card_dahdi_preregistration); CHECK_XOP(card_dahdi_postregistration); - CHECK_XOP(card_hooksig); // CHECK_XOP(card_ioctl); // optional method -- call after testing CHECK_XOP(card_register_reply); CHECK_XOP(XPD_STATE); |