From: shuntongzhang Date: Thu, 15 Oct 2015 14:33:00 +0000 (+0800) Subject: FS-8341 [mod_distributor] fix gateway choose bug X-Git-Tag: v1.6.4~1^2~24^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ce46043c3107c8b5a051d801e4a6c99253e8557;p=thirdparty%2Ffreeswitch.git FS-8341 [mod_distributor] fix gateway choose bug --- diff --git a/src/mod/applications/mod_distributor/mod_distributor.c b/src/mod/applications/mod_distributor/mod_distributor.c index 7b1ae3790e..b02b438669 100644 --- a/src/mod/applications/mod_distributor/mod_distributor.c +++ b/src/mod/applications/mod_distributor/mod_distributor.c @@ -238,6 +238,7 @@ static struct dist_node *find_next(struct dist_list *list, int etotal, char **ex list->last = -1; } match = NULL; + matches = 0; for (np = list->nodes; np; np = np->next) { if (np->cur_weight < list->target_weight) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG10, "%s %d/%d\n", np->name, np->cur_weight, list->target_weight);