Module: kamailio
Branch: master
Commit: 3f57257c118ede63979d9755dd9d0d809d0cbebd
URL:
https://github.com/kamailio/kamailio/commit/3f57257c118ede63979d9755dd9d0d8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-03-10T15:27:55+01:00
tm: t_clean() exported to kemi framework
---
Modified: src/modules/tm/tm.c
---
Diff:
https://github.com/kamailio/kamailio/commit/3f57257c118ede63979d9755dd9d0d8…
Patch:
https://github.com/kamailio/kamailio/commit/3f57257c118ede63979d9755dd9d0d8…
---
diff --git a/src/modules/tm/tm.c b/src/modules/tm/tm.c
index ec39c3cd49..69990200ef 100644
--- a/src/modules/tm/tm.c
+++ b/src/modules/tm/tm.c
@@ -2961,6 +2961,13 @@ static int t_clean(struct sip_msg* msg, char* key, char* value)
return 1;
}
+/* kemi function to clean active but very old transactions */
+static int ki_t_clean(sip_msg_t* msg)
+{
+ tm_clean_lifetime();
+ return 1;
+}
+
/**
*
*/
@@ -3221,6 +3228,12 @@ static sr_kemi_t tm_kemi_exports[] = {
{ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
},
+ { str_init("tm"), str_init("t_clean"),
+ SR_KEMIP_INT, ki_t_clean,
+ { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
+ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+ },
+
{ {0, 0}, {0, 0}, 0, NULL, { 0, 0, 0, 0, 0, 0 } }
};