[sr-dev] git:master:3f57257c: tm: t_clean() exported to kemi framework

Daniel-Constantin Mierla miconda at gmail.com
Tue Mar 10 20:10:22 CET 2020


Module: kamailio
Branch: master
Commit: 3f57257c118ede63979d9755dd9d0d809d0cbebd
URL: https://github.com/kamailio/kamailio/commit/3f57257c118ede63979d9755dd9d0d809d0cbebd

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at 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/3f57257c118ede63979d9755dd9d0d809d0cbebd.diff
Patch: https://github.com/kamailio/kamailio/commit/3f57257c118ede63979d9755dd9d0d809d0cbebd.patch

---

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 } }
 };




More information about the sr-dev mailing list