[sr-dev] git:5.2:d63b21f1: core: kemi - wrapper function to run callbacks with context

Daniel-Constantin Mierla miconda at gmail.com
Wed Apr 10 10:52:55 CEST 2019


Module: kamailio
Branch: 5.2
Commit: d63b21f1b52861a31555f63b2d8d88c0c2a672ba
URL: https://github.com/kamailio/kamailio/commit/d63b21f1b52861a31555f63b2d8d88c0c2a672ba

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

core: kemi - wrapper function to run callbacks with context

(cherry picked from commit 395cae83da4d83920dd038d299c30ffa97b6c272)

---

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

---

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

---

diff --git a/src/core/kemi.c b/src/core/kemi.c
index 3c6bba057f..456733b5e1 100644
--- a/src/core/kemi.c
+++ b/src/core/kemi.c
@@ -2422,3 +2422,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 473189ed0f..96ecf98cd2 100644
--- a/src/core/kemi.h
+++ b/src/core/kemi.h
@@ -146,5 +146,7 @@ int sr_kemi_core_set_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