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