Module: kamailio
Branch: master
Commit: 41016d1835c1ab62b7d3c0f6299fae727a6f7ed3
URL:
https://github.com/kamailio/kamailio/commit/41016d1835c1ab62b7d3c0f6299fae7…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-07-31T15:57:01+02:00
dispatcher: range checks for oc rate min/max limits
---
Modified: src/modules/dispatcher/dispatch.c
---
Diff:
https://github.com/kamailio/kamailio/commit/41016d1835c1ab62b7d3c0f6299fae7…
Patch:
https://github.com/kamailio/kamailio/commit/41016d1835c1ab62b7d3c0f6299fae7…
---
diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c
index 8295145da0f..5e6f7da8926 100644
--- a/src/modules/dispatcher/dispatch.c
+++ b/src/modules/dispatcher/dispatch.c
@@ -411,9 +411,15 @@ int ds_set_attrs(ds_dest_t *dest, str *vattrs)
if(dest->attrs.ocmax > 100) {
dest->attrs.ocmax = 100;
}
+ if(dest->attrs.ocmax <= 0) {
+ dest->attrs.ocmax = 100;
+ }
if(dest->attrs.ocmin > 100) {
dest->attrs.ocmin = 0;
}
+ if(dest->attrs.ocmin < 0) {
+ dest->attrs.ocmin = 0;
+ }
if(dest->attrs.ocrate > 100) {
dest->attrs.ocrate = 0;
}