[sr-dev] git:5.1:381926e9: core: kemi - wrapper function to run callbacks with context

Daniel-Constantin Mierla miconda at gmail.com
Wed Apr 10 11:22:04 CEST 2019


Module: kamailio
Branch: 5.1
Commit: 381926e96f9ab9f38e920b5a0e9c29afdd7480f0
URL: https://github.com/kamailio/kamailio/commit/381926e96f9ab9f38e920b5a0e9c29afdd7480f0

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2019-04-10T11:07:02+02:00

core: kemi - wrapper function to run callbacks with context

(cherry picked from commit 395cae83da4d83920dd038d299c30ffa97b6c272)
(cherry picked from commit d63b21f1b52861a31555f63b2d8d88c0c2a672ba)

---

Modified: src/core/kemi.c
Modified: src/core/kemi.h

---

Diff:  https://github.com/kamailio/kamailio/commit/381926e96f9ab9f38e920b5a0e9c29afdd7480f0.diff
Patch: https://github.com/kamailio/kamailio/commit/381926e96f9ab9f38e920b5a0e9c29afdd7480f0.patch

---

diff --git a/src/core/kemi.c b/src/core/kemi.c
index 37b8ee795a..f42005061b 100644
--- a/src/core/kemi.c
+++ b/src/core/kemi.c
@@ -1678,3 +1678,13 @@ int sr_kemi_route(sr_kemi_eng_t *keng, sip_msg_t *msg, int rtype,
 	setsflagsval(sfbk);
 	return ret;
 }
+
+/**
+ *
+ */
+int sr_kemi_ctx_route(sr_kemi_eng_t *keng, run_act_ctx_t *ctx, sip_msg_t *msg,
+		int rtype, str *ename, str *edata)
+{
+	sr_kemi_act_ctx_set(ctx);
+	return sr_kemi_route(keng, msg, rtype, ename, edata);
+}
diff --git a/src/core/kemi.h b/src/core/kemi.h
index d5fe64d451..9358dd1262 100644
--- a/src/core/kemi.h
+++ b/src/core/kemi.h
@@ -142,5 +142,7 @@ int sr_kemi_core_drop(sip_msg_t *msg);
 
 int sr_kemi_route(sr_kemi_eng_t *keng, sip_msg_t *msg, int rtype,
 		str *ename, str *edata);
+int sr_kemi_ctx_route(sr_kemi_eng_t *keng, run_act_ctx_t *ctx, sip_msg_t *msg,
+		int rtype, str *ename, str *edata);
 
 #endif




More information about the sr-dev mailing list