Module: kamailio
Branch: master
Commit: 4d8e888c805ddecdb7227350c1c01e52c235ffb5
URL:
https://github.com/kamailio/kamailio/commit/4d8e888c805ddecdb7227350c1c01e5…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-01-15T10:37:42+01:00
usrloc: add ka_randomize to ka_interval when checking for keepalive
---
Modified: src/modules/usrloc/ul_keepalive.c
---
Diff:
https://github.com/kamailio/kamailio/commit/4d8e888c805ddecdb7227350c1c01e5…
Patch:
https://github.com/kamailio/kamailio/commit/4d8e888c805ddecdb7227350c1c01e5…
---
diff --git a/src/modules/usrloc/ul_keepalive.c b/src/modules/usrloc/ul_keepalive.c
index eba6bec5c0d..8d0fc259bdf 100644
--- a/src/modules/usrloc/ul_keepalive.c
+++ b/src/modules/usrloc/ul_keepalive.c
@@ -163,7 +163,7 @@ int ul_ka_urecord(urecord_t *ur)
}
}
if(ul_ka_interval > 0 && uc->last_keepalive > 0) {
- ka_limit = ul_ka_interval - (fastrand() % ul_ka_randomize);
+ ka_limit = ul_ka_interval + (fastrand() % ul_ka_randomize);
if((uc->last_keepalive + ka_limit) < tnow) {
/* not yet the time for keepalive */
continue;