Module: kamailio
Branch: 5.8
Commit: 0b3aa00775a5c0b4b1dc4990f4c26bc637fc6de5
URL:
https://github.com/kamailio/kamailio/commit/0b3aa00775a5c0b4b1dc4990f4c26bc…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-03-20T13:15:36+01:00
keepalive: proper storing of last up/down timestamps
- GH #3790
(cherry picked from commit 9e2a0ee545646bd4491ecdbe58d7fea770764b54)
---
Modified: src/modules/keepalive/keepalive_core.c
---
Diff:
https://github.com/kamailio/kamailio/commit/0b3aa00775a5c0b4b1dc4990f4c26bc…
Patch:
https://github.com/kamailio/kamailio/commit/0b3aa00775a5c0b4b1dc4990f4c26bc…
---
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++;
}