[sr-dev] git:master:0689ac59: core: kemi - backpup and restore old context inside sr_kemi_ctx_route()
Daniel-Constantin Mierla
miconda at gmail.com
Wed Apr 10 09:57:23 CEST 2019
Module: kamailio
Branch: master
Commit: 0689ac5976121d5a8edf815c0cee51da1098530f
URL: https://github.com/kamailio/kamailio/commit/0689ac5976121d5a8edf815c0cee51da1098530f
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2019-04-10T09:56:20+02:00
core: kemi - backpup and restore old context inside sr_kemi_ctx_route()
---
Modified: src/core/kemi.c
---
Diff: https://github.com/kamailio/kamailio/commit/0689ac5976121d5a8edf815c0cee51da1098530f.diff
Patch: https://github.com/kamailio/kamailio/commit/0689ac5976121d5a8edf815c0cee51da1098530f.patch
---
diff --git a/src/core/kemi.c b/src/core/kemi.c
index deb9285b9d..039ba1557f 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