Module: kamailio
Branch: master
Commit: b3875476e02bf2590e857f73367efa4cedfbd328
URL:
https://github.com/kamailio/kamailio/commit/b3875476e02bf2590e857f73367efa4…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-06-13T13:09:08+02:00
dispatcher: use milliseconds for time validity interval
---
Modified: src/modules/dispatcher/dispatch.c
---
Diff:
https://github.com/kamailio/kamailio/commit/b3875476e02bf2590e857f73367efa4…
Patch:
https://github.com/kamailio/kamailio/commit/b3875476e02bf2590e857f73367efa4…
---
diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c
index 678352bf62d..ecd0f3a0c9d 100644
--- a/src/modules/dispatcher/dispatch.c
+++ b/src/modules/dispatcher/dispatch.c
@@ -473,8 +473,8 @@ int ds_oc_set_attrs(
timerclear(&tdiff);
/* interval set to itval or to default 500 milliseconds */
- tdiff.tv_sec = ((itval > 0) ? itval : 500000) / 1000000;
- tdiff.tv_usec = ((itval > 0) ? itval : 500000) % 1000000;
+ tdiff.tv_sec = (((itval > 0) ? itval : 500) * 1000) / 1000000;
+ tdiff.tv_usec = (((itval > 0) ? itval : 500) * 1000) % 1000000;
for(i = 0; i < idx->nr; i++) {
if(idx->dlist[i].uri.len == duri->len