Module: kamailio
Branch: 5.6
Commit: 6b74c2a08a5a1f7dcd62bf8c3477b6bf1f51a4d3
URL:
https://github.com/kamailio/kamailio/commit/6b74c2a08a5a1f7dcd62bf8c3477b6b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-08-16T11:59:53+02:00
usrloc: do not send keepalives when destroying modules
- GH #3207
(cherry picked from commit 939ceb3390b171b773eeb438b8fff72022e4f6f0)
---
Modified: src/modules/usrloc/ul_keepalive.c
---
Diff:
https://github.com/kamailio/kamailio/commit/6b74c2a08a5a1f7dcd62bf8c3477b6b…
Patch:
https://github.com/kamailio/kamailio/commit/6b74c2a08a5a1f7dcd62bf8c3477b6b…
---
diff --git a/src/modules/usrloc/ul_keepalive.c b/src/modules/usrloc/ul_keepalive.c
index 5b1572483b..8808725849 100644
--- a/src/modules/usrloc/ul_keepalive.c
+++ b/src/modules/usrloc/ul_keepalive.c
@@ -33,6 +33,7 @@
#include "../../core/forward.h"
#include "../../core/globals.h"
#include "../../core/pvar.h"
+#include "../../core/sr_module.h"
#include "../../core/parser/parse_uri.h"
#include "../../core/parser/parse_from.h"
#include "../../core/parser/parse_to.h"
@@ -110,6 +111,11 @@ int ul_ka_urecord(urecord_t *ur)
if (ul_ka_mode == ULKA_NONE) {
return 0;
}
+
+ if(likely(destroy_modules_phase()!=0)) {
+ return 0;
+ }
+
LM_DBG("keepalive for aor: %.*s\n", ur->aor.len, ur->aor.s);
tnow = time(NULL);