Skip to content

Commit

Permalink
core: kemi - backpup and restore old context inside sr_kemi_ctx_route()
Browse files Browse the repository at this point in the history
(cherry picked from commit 0689ac5)
(cherry picked from commit cb1b346)
  • Loading branch information
miconda committed Apr 10, 2019
1 parent 381926e commit 30e2399
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/core/kemi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1685,6 +1685,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;
}

0 comments on commit 30e2399

Please sign in to comment.