Module: kamailio Branch: 5.2 Commit: 0c78f5d026202031d2d2cdd21049805559b5e1f2 URL: https://github.com/kamailio/kamailio/commit/0c78f5d026202031d2d2cdd21049805559b5e1f2
Author: Daniel-Constantin Mierla <[email protected]> Committer: Daniel-Constantin Mierla <[email protected]> Date: 2019-04-10T10:50:40+02:00 msrp: set the context to kemi callback function execution (cherry picked from commit 501c2b88e8e0bf16f2be0b0255d35d449467a60d) --- Modified: src/modules/msrp/msrp_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/0c78f5d026202031d2d2cdd21049805559b5e1f2.diff Patch: https://github.com/kamailio/kamailio/commit/0c78f5d026202031d2d2cdd21049805559b5e1f2.patch --- diff --git a/src/modules/msrp/msrp_mod.c b/src/modules/msrp/msrp_mod.c index d69beea133..dfe7056f39 100644 --- a/src/modules/msrp/msrp_mod.c +++ b/src/modules/msrp/msrp_mod.c @@ -531,16 +531,13 @@ static int msrp_frame_received(sr_event_param_t *evp) fmsg->rcv = *tev->rcv; rtb = get_route_type(); set_route_type(EVENT_ROUTE); + init_run_actions_ctx(&ctx); if(msrp_event_callback.s == NULL || msrp_event_callback.len <= 0) { /* native cfg script execution */ rt = route_get(&event_rt, evname.s); LM_DBG("executing event_route[msrp:frame-in] (%d)\n", rt); if(rt >= 0 && event_rt.rlist[rt] != NULL) { - init_run_actions_ctx(&ctx); run_top_route(event_rt.rlist[rt], fmsg, &ctx); - if(ctx.run_flags & DROP_R_F) { - LM_DBG("exit due to 'drop' in event route\n"); - } } else { LM_ERR("empty event route block for msrp handling\n"); } @@ -551,12 +548,15 @@ static int msrp_frame_received(sr_event_param_t *evp) LM_ERR("event callback (%s) set, but no cfg engine\n", msrp_event_callback.s); } else { - if(sr_kemi_route(keng, fmsg, EVENT_ROUTE, + if(sr_kemi_ctx_route(keng, &ctx, fmsg, EVENT_ROUTE, &msrp_event_callback, &evname)<0) { LM_ERR("error running event route kemi callback\n"); } } } + if(ctx.run_flags & DROP_R_F) { + LM_DBG("exit due to 'drop' in event route\n"); + } set_route_type(rtb); if(fmsg != NULL) free_sip_msg(fmsg); _______________________________________________ Kamailio (SER) - Development Mailing List [email protected] https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
