git:master:72ae9283: tmx: Try to get branch_index for all replies
Module: kamailio Branch: master Commit: 72ae9283fa969c13ba1c6d599c2844e1473883f4 URL: https://github.com/kamailio/kamailio/commit/72ae9283fa969c13ba1c6d599c2844e1... Author: Alex Hermann <alex@speakup.nl> Committer: Alex Hermann <alex@speakup.nl> Date: 2016-08-02T12:47:45+02:00 tmx: Try to get branch_index for all replies Just check if the tm context is set and return its branch_index. The check for CORE_ONREPLY_ROUTE is flawed as the transaction may have been set anyway (by t_check_trans() for example). --- Modified: modules/tmx/t_var.c --- Diff: https://github.com/kamailio/kamailio/commit/72ae9283fa969c13ba1c6d599c2844e1... Patch: https://github.com/kamailio/kamailio/commit/72ae9283fa969c13ba1c6d599c2844e1... --- diff --git a/modules/tmx/t_var.c b/modules/tmx/t_var.c index 6e83761..83cd8c6 100644 --- a/modules/tmx/t_var.c +++ b/modules/tmx/t_var.c @@ -396,7 +396,7 @@ int pv_get_tm_branch_idx(struct sip_msg *msg, pv_param_t *param, return -1; /* statefull replies have the branch_index set */ - if(msg->first_line.type == SIP_REPLY && route_type != CORE_ONREPLY_ROUTE) { + if(msg->first_line.type == SIP_REPLY) { tcx = _tmx_tmb.tm_ctx_get(); if(tcx != NULL) idx = tcx->branch_index;
participants (1)
-
Alex Hermann