Module: kamailio
Branch: master
Commit: 40d657592d1be9975deae6052132c458d6485fd9
URL:
https://github.com/kamailio/kamailio/commit/40d657592d1be9975deae6052132c45…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-06-12T13:35:05+02:00
dispatcher: internally keep the selecting instead of skipping rate
---
Modified: src/modules/dispatcher/dispatch.c
---
Diff:
https://github.com/kamailio/kamailio/commit/40d657592d1be9975deae6052132c45…
Patch:
https://github.com/kamailio/kamailio/commit/40d657592d1be9975deae6052132c45…
---
diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c
index 84166540a37..bab1a5deb31 100644
--- a/src/modules/dispatcher/dispatch.c
+++ b/src/modules/dispatcher/dispatch.c
@@ -412,7 +412,7 @@ int ds_set_attrs(ds_dest_t *dest, str *vattrs)
dest->attrs.ocmax = 100;
}
if(dest->attrs.ocmin < 0 || dest->attrs.ocmin > 100) {
- dest->attrs.ocmin = 10;
+ dest->attrs.ocmin = 0;
}
if(dest->attrs.ocrate <= 0 || dest->attrs.ocrate > 100) {
dest->attrs.ocrate = 0;
@@ -482,7 +482,7 @@ int ds_oc_set_attrs(
LM_DBG("skipping entry %d due to seq condition\n", i);
continue;
}
- idx->dlist[i].attrs.ocrate = irval;
+ idx->dlist[i].attrs.ocrate = 100 - irval;
if(idx->dlist[i].attrs.ocrate < idx->dlist[i].attrs.ocmin) {
idx->dlist[i].attrs.ocrate = idx->dlist[i].attrs.ocmin;
}