[Asterisk-cvs] asterisk/channels chan_zap.c,1.450,1.451

mattf at lists.digium.com mattf at lists.digium.com
Tue May 24 10:15:12 CDT 2005


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv25406/channels

Modified Files:
	chan_zap.c 
Log Message:
More updates for NFAS span/channel mapping


Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.450
retrieving revision 1.451
diff -u -d -r1.450 -r1.451
--- chan_zap.c	23 May 2005 17:07:32 -0000	1.450
+++ chan_zap.c	24 May 2005 14:19:27 -0000	1.451
@@ -7325,21 +7325,22 @@
 }
 
 
-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++) {




More information about the svn-commits mailing list