[asterisk-commits] crichter: branch 1.2 r59623 - /branches/1.2/channels/misdn/isdn_lib.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Apr 2 00:12:25 MST 2007


Author: crichter
Date: Mon Apr  2 02:12:24 2007
New Revision: 59623

URL: http://svn.digium.com/view/asterisk?view=rev&rev=59623
Log:
we can now make 30 channels on a PRI (before we forgot chan 31..)

Modified:
    branches/1.2/channels/misdn/isdn_lib.c

Modified: branches/1.2/channels/misdn/isdn_lib.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/misdn/isdn_lib.c?view=diff&rev=59623&r1=59622&r2=59623
==============================================================================
--- branches/1.2/channels/misdn/isdn_lib.c (original)
+++ branches/1.2/channels/misdn/isdn_lib.c Mon Apr  2 02:12:24 2007
@@ -429,9 +429,11 @@
 	}
 	
 	channel--;
+
+	int bnums=stack->pri?stack->b_num:stack->b_num-1;
  
  	if (dec) {
-		for (i = stack->b_num-1; i >=0; i--) {
+		for (i = bnums; i >=0; i--) {
 			if (i != 15 && (channel < 0 || i == channel)) { /* skip E1 Dchannel ;) and work with chan preselection */
 				if (!stack->channels[i]) {
 					cb_log (3, stack->port, " --> found chan%s: %d\n", channel>=0?" (preselected)":"", i+1);
@@ -440,7 +442,7 @@
 			}
 		}
 	} else {
-		for (i = 0; i < stack->b_num; i++) {
+		for (i = 0; i <= bnums; i++) {
 			if (i != 15 && (channel < 0 || i == channel)) { /* skip E1 Dchannel ;) and work with chan preselection */
 				if (!stack->channels[i]) {
 					cb_log (3, stack->port, " --> found chan%s: %d\n", channel>=0?" (preselected)":"", i+1);



More information about the asterisk-commits mailing list