[sr-dev] git:5.2:cb1b346f: core: kemi - backpup and restore old context inside sr_kemi_ctx_route()
Daniel-Constantin Mierla
miconda at gmail.com
Wed Apr 10 10:52:56 CEST 2019
Module: kamailio
Branch: 5.2
Commit: cb1b346f6b815ed0fdd9644e5c208f7c2a0d9f14
URL: https://github.com/kamailio/kamailio/commit/cb1b346f6b815ed0fdd9644e5c208f7c2a0d9f14
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2019-04-10T10:50:09+02:00
core: kemi - backpup and restore old context inside sr_kemi_ctx_route()
(cherry picked from commit 0689ac5976121d5a8edf815c0cee51da1098530f)
---
Modified: src/core/kemi.c
---
Diff: https://github.com/kamailio/kamailio/commit/cb1b346f6b815ed0fdd9644e5c208f7c2a0d9f14.diff
Patch: https://github.com/kamailio/kamailio/commit/cb1b346f6b815ed0fdd9644e5c208f7c2a0d9f14.patch
---
diff --git a/src/core/kemi.c b/src/core/kemi.c
index 456733b5e1..f638174947 100644
--- a/src/core/kemi.c
+++ b/src/core/kemi.c
@@ -2429,6 +2429,12 @@ int sr_kemi_route(sr_kemi_eng_t *keng, sip_msg_t *msg, int rtype,
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)
{
+ run_act_ctx_t *bctx;
+ int ret;
+
+ bctx = sr_kemi_act_ctx_get();
sr_kemi_act_ctx_set(ctx);
- return sr_kemi_route(keng, msg, rtype, ename, edata);
+ ret = sr_kemi_route(keng, msg, rtype, ename, edata);
+ sr_kemi_act_ctx_set(bctx);
+ return ret;
}
More information about the sr-dev
mailing list