]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-8341 [mod_distributor] fix gateway choose bug
authorshuntongzhang <shuntongzhang@gmail.com>
Thu, 15 Oct 2015 14:33:00 +0000 (22:33 +0800)
committershuntongzhang <shuntongzhang@gmail.com>
Thu, 15 Oct 2015 14:33:00 +0000 (22:33 +0800)
src/mod/applications/mod_distributor/mod_distributor.c

index 7b1ae3790eb0b33a8df54fdce812626616b57724..b02b4386690254e2ad283bc3dea01634b035dcc4 100644 (file)
@@ -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);