Module: kamailio
Branch: master
Commit: 9e2a0ee545646bd4491ecdbe58d7fea770764b54
URL:
https://github.com/kamailio/kamailio/commit/9e2a0ee545646bd4491ecdbe58d7fea…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-03-19T09:51:28+01:00
keepalive: proper storing of last up/down timestamps
- GH #3790
---
Modified: src/modules/keepalive/keepalive_core.c
---
Diff:
https://github.com/kamailio/kamailio/commit/9e2a0ee545646bd4491ecdbe58d7fea…
Patch:
https://github.com/kamailio/kamailio/commit/9e2a0ee545646bd4491ecdbe58d7fea…
---
diff --git a/src/modules/keepalive/keepalive_core.c
b/src/modules/keepalive/keepalive_core.c
index 0aaafa8c8da..b1b3581cb34 100644
--- a/src/modules/keepalive/keepalive_core.c
+++ b/src/modules/keepalive/keepalive_core.c
@@ -131,11 +131,11 @@ static void ka_options_callback(
// accepting 2XX return codes
if(ps->code >= 200 && ps->code <= 299) {
state = KA_STATE_UP;
- ka_dest->last_down = time(NULL);
+ ka_dest->last_up = time(NULL);
ka_dest->counter = 0;
} else {
state = KA_STATE_DOWN;
- ka_dest->last_up = time(NULL);
+ ka_dest->last_down = time(NULL);
ka_dest->counter++;
}