[asterisk-commits] irroot: branch irroot/distrotech-customers-10 r334216 - in /team/irroot/distr...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 1 08:11:46 CDT 2011


Author: irroot
Date: Thu Sep  1 08:11:41 2011
New Revision: 334216

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=334216
Log:
chan_misdn.c round robin routing does not work well it will only use one channel on a port 
im happy with it using any available channel on a port that is selected.


Modified:
    team/irroot/distrotech-customers-10/   (props changed)
    team/irroot/distrotech-customers-10/channels/chan_misdn.c

Propchange: team/irroot/distrotech-customers-10/
------------------------------------------------------------------------------
    automerge = *

Propchange: team/irroot/distrotech-customers-10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Propchange: team/irroot/distrotech-customers-10/
------------------------------------------------------------------------------
    svn:mergeinfo = /branches/10:333478-334215

Modified: team/irroot/distrotech-customers-10/channels/chan_misdn.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-10/channels/chan_misdn.c?view=diff&rev=334216&r1=334215&r2=334216
==============================================================================
--- team/irroot/distrotech-customers-10/channels/chan_misdn.c (original)
+++ team/irroot/distrotech-customers-10/channels/chan_misdn.c Thu Sep  1 08:11:41 2011
@@ -7873,9 +7873,7 @@
 		}
 
 		if (rr) {
-			int robin_channel = rr->channel;
 			int port_start;
-			int next_chan = 1;
 
 			do {
 				port_start = 0;
@@ -7886,19 +7884,6 @@
 						port_start = port;
 					}
 
-					if (port >= port_start) {
-						next_chan = 1;
-					}
-
-					if (port <= port_start && next_chan) {
-						int maxbchans = misdn_lib_get_maxchans(port);
-
-						if (++robin_channel >= maxbchans) {
-							robin_channel = 1;
-						}
-						next_chan = 0;
-					}
-
 					misdn_cfg_get(port, MISDN_CFG_GROUPNAME, cfg_group, sizeof(cfg_group));
 
 					if (!strcasecmp(cfg_group, group)) {
@@ -7916,13 +7901,11 @@
 							ast_log(LOG_WARNING, "This port (%d) is blocked\n", port);
 						}
 
-						if (port_up > 0)	{
-							newbc = misdn_lib_get_free_bc(port, robin_channel, 0, 0);
+						if (port_up > 0) {
+							newbc = misdn_lib_get_free_bc(port, 0, 0, dec);
 							if (newbc) {
 								chan_misdn_log(4, port, " Success! Found port:%d channel:%d\n", newbc->port, newbc->channel);
-								if (port_up) {
-									chan_misdn_log(4, port, "portup:%d\n",  port_up);
-								}
+								chan_misdn_log(4, port, "portup:%d\n",  port_up);
 								rr->port = newbc->port;
 								rr->channel = newbc->channel;
 								break;
@@ -7930,7 +7913,7 @@
 						}
 					}
 				}
-			} while (!newbc && robin_channel != rr->channel);
+			} while (!newbc);
 		} 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