[asterisk-commits] irroot: branch irroot/distrotech-customers-trunk r344964 - /team/irroot/distr...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Nov 12 10:03:08 CST 2011


Author: irroot
Date: Sat Nov 12 10:03:04 2011
New Revision: 344964

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=344964
Log:
Fix mISDN RR After tests

Modified:
    team/irroot/distrotech-customers-trunk/channels/chan_misdn.c

Modified: team/irroot/distrotech-customers-trunk/channels/chan_misdn.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/channels/chan_misdn.c?view=diff&rev=344964&r1=344963&r2=344964
==============================================================================
--- team/irroot/distrotech-customers-trunk/channels/chan_misdn.c (original)
+++ team/irroot/distrotech-customers-trunk/channels/chan_misdn.c Sat Nov 12 10:03:04 2011
@@ -7906,6 +7906,7 @@
 			do {
 				misdn_cfg_get(rr->port, MISDN_CFG_GROUPNAME, cfg_group, sizeof(cfg_group));
 				if (strcasecmp(cfg_group, group)) {
+					wraped = 1;
 					rr->port = misdn_cfg_get_next_port_spin(rr->port);
 					rr->channel = 1;
 					continue;
@@ -7940,15 +7941,16 @@
 							break;
 						}
 					}
-					if (!newbc || (rr->channel > maxbchans)) {
+					if (wraped && (rr->port == port_start) && (rr->channel <= bchan_start)) {
+						break;
+					} else if (!newbc || (rr->channel == maxbchans)) {
 						rr->port = misdn_cfg_get_next_port_spin(rr->port);
 						rr->channel = 1;
 					}
 
 				}
 				wraped = 1;
-			} while (!newbc && (rr->port > 0) &&
-				 ((rr->port != port_start) || ((rr->port == port_start) && (rr->channel < bchan_start))));
+			} while (!newbc && (rr->port > 0));
 		} else {
 			for (port = misdn_cfg_get_next_port(0); port > 0;
 				port = misdn_cfg_get_next_port(port)) {




More information about the asterisk-commits mailing list