瀏覽代碼

modules/tm: Make branch_index consistent in all route types

The branch index was set one to high in BRANCH_ROUTE, leading to
inconsistent branch numbers in reply routes.
Alex Hermann 13 年之前
父節點
當前提交
e23e51ee2d
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules/tm/t_fwd.c

+ 1 - 1
modules/tm/t_fwd.c

@@ -317,7 +317,7 @@ static int prepare_new_uac( struct cell *t, struct sip_msg *i_req,
 			/* run branch_route actions if provided */
 			backup_route_type = get_route_type();
 			set_route_type(BRANCH_ROUTE);
-			tm_ctx_set_branch_index(branch+1);
+			tm_ctx_set_branch_index(branch);
 			/* no need to backup/set avp lists: the on_branch route is run
 			   only in the main route context (e.g. t_relay() in the main
 			   route) or in the failure route context (e.g. append_branch &