Module: kamailio
Branch: master
Commit: a0521f714a29fe205f83cd176f961344c8d9c79d
URL:
https://github.com/kamailio/kamailio/commit/a0521f714a29fe205f83cd176f96134…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-09-28T09:28:02+02:00
dispatcher: proper selection of the gateway when the maxload is 0
- reported and patch by Carlos Cruz Luengo, GH #800
---
Modified: modules/dispatcher/dispatch.c
---
Diff:
https://github.com/kamailio/kamailio/commit/a0521f714a29fe205f83cd176f96134…
Patch:
https://github.com/kamailio/kamailio/commit/a0521f714a29fe205f83cd176f96134…
---
diff --git a/modules/dispatcher/dispatch.c b/modules/dispatcher/dispatch.c
index f257475..be268b7 100644
--- a/modules/dispatcher/dispatch.c
+++ b/modules/dispatcher/dispatch.c
@@ -1406,7 +1406,8 @@ int ds_get_leastloaded(ds_set_t *dset)
for(j=0; j<dset->nr; j++)
{
if(!ds_skip_dst(dset->dlist[j].flags)
- && dset->dlist[j].dload<dset->dlist[j].attrs.maxload)
+ && (dset->dlist[j].attrs.maxload == 0
+ || dset->dlist[j].dload<dset->dlist[j].attrs.maxload))
{
if(dset->dlist[j].dload<t)
{