Module: kamailio
Branch: master
Commit: 67497692ff4a74a5cb3dc774184252243ea5c47b
URL:
https://github.com/kamailio/kamailio/commit/67497692ff4a74a5cb3dc7741842522…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-11-19T11:55:34+01:00
dispatcher: updated boundary checks for uint32_t ocmin and ocmax
---
Modified: src/modules/dispatcher/dispatch.c
---
Diff:
https://github.com/kamailio/kamailio/commit/67497692ff4a74a5cb3dc7741842522…
Patch:
https://github.com/kamailio/kamailio/commit/67497692ff4a74a5cb3dc7741842522…
---
diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c
index 83bb7636206..1c31ca3fc95 100644
--- a/src/modules/dispatcher/dispatch.c
+++ b/src/modules/dispatcher/dispatch.c
@@ -412,13 +412,13 @@ int ds_set_attrs(ds_dest_t *dest, str *vattrs)
if(dest->ocdata.ocmax > 100) {
dest->ocdata.ocmax = 100;
}
- if(dest->ocdata.ocmax <= 0) {
+ if(dest->ocdata.ocmax == 0) {
dest->ocdata.ocmax = 100;
}
if(dest->ocdata.ocmin > 100) {
dest->ocdata.ocmin = 0;
}
- if(dest->ocdata.ocmin < 0) {
+ if(dest->ocdata.ocmin > dest->ocdata.ocmax) {
dest->ocdata.ocmin = 0;
}
if(dest->ocdata.ocrate > 100) {