Explorar o código

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).
Alex Hermann %!s(int64=9) %!d(string=hai) anos
pai
achega
72ae9283fa
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      modules/tmx/t_var.c

+ 1 - 1
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;