Module: kamailio Branch: master Commit: ba27633ca22bcfc18fd4bb7d62c2f5bb32e56962 URL: https://github.com/kamailio/kamailio/commit/ba27633ca22bcfc18fd4bb7d62c2f5bb32e56962
Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2020-12-10T17:07:30+01:00 dispatcher: info log message when adding extra weight or rweight percentages --- Modified: src/modules/dispatcher/dispatch.c --- Diff: https://github.com/kamailio/kamailio/commit/ba27633ca22bcfc18fd4bb7d62c2f5bb32e56962.diff Patch: https://github.com/kamailio/kamailio/commit/ba27633ca22bcfc18fd4bb7d62c2f5bb32e56962.patch --- diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c index c1f4dbfd8f..c0a6d22fc0 100644 --- a/src/modules/dispatcher/dispatch.c +++ b/src/modules/dispatcher/dispatch.c @@ -653,6 +653,10 @@ int dp_init_relative_weights(ds_set_t *dset) /* if the array was not completely filled (i.e., the sum of rweights is * less than 100 due to truncated), then use last address to fill the rest */ last_insert = t > 0 ? dset->rwlist[t - 1] : (unsigned int)(dset->nr - 1); + if(t < 100) { + LM_INFO("extra rweight %d for last active destination in group %d\n", + (100-t), dset->id); + } for(j = t; j < 100; j++) dset->rwlist[j] = last_insert; @@ -706,6 +710,10 @@ int dp_init_weights(ds_set_t *dset) } /* if the array was not completely filled (i.e., the sum of weights is * less than 100), then use last address to fill the rest */ + if(t < 100) { + LM_INFO("extra weight %d for last destination in group %d\n", + (100-t), dset->id); + } for(; t < 100; t++) dset->wlist[t] = (unsigned int)(dset->nr - 1); randomize: _______________________________________________ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev