summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorMatthew Fredrickson <creslin@digium.com>2005-05-24 14:19:27 +0000
committerMatthew Fredrickson <creslin@digium.com>2005-05-24 14:19:27 +0000
commite92b07d372cc49c9c9db8f182890f80c0ee9950e (patch)
tree7562d180eab64b0e93f7f2da4b42da621cde0839 /channels
parent4fcf27b6810c74264c762f5a6fdf62bcea676c69 (diff)
More updates for NFAS span/channel mapping
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/chan_zap.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index de9f0f4c1..81bb78bc9 100755
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -7325,21 +7325,22 @@ static struct zt_pvt *pri_find_crv(struct zt_pri *pri, int crv)
}
-static int pri_find_principle(struct zt_pri *pri, int channel)
+static int pri_find_principle(struct zt_pri *pri, int prichannel)
{
int x;
- int span;
+ int span = PRI_SPAN(prichannel);
int spanfd;
- struct zt_params param;
+ ZT_PARAMS param;
int principle = -1;
- span = PRI_SPAN(channel);
- channel = PRI_CHANNEL(channel);
+ int channel = PRI_CHANNEL(prichannel);
- if (!PRI_EXPLICIT(channel)) {
+ /* For implicit channel selection, the channel specified is on the
+ * span with the active d channel */
+ if (!PRI_EXPLICIT(prichannel)) {
spanfd = pri_active_dchan_fd(pri);
if (ioctl(spanfd, ZT_GET_PARAMS, &param))
return -1;
- span = param.spanno - 1;
+ span = pris[param.spanno - 1].prilogicalspan;
}
for (x=0;x<pri->numchans;x++) {