浏览代码

verify the return value of append_branch()

Miklos Tirpak 17 年之前
父节点
当前提交
599a6209e6
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      etc/ser-oob.cfg

+ 4 - 1
etc/ser-oob.cfg

@@ -497,7 +497,10 @@ route[FORWARD]
 {
 	# if this is called from the failure route we need to open a new branch
 	if (isflagset(FLAG_FAILUREROUTE)) {
-		append_branch();
+		if (!append_branch()) {
+			t_reply("500", "Too many branches");
+			drop;
+		}
 	}
 
 	# if this is an initial INVITE (without a To-tag) we might try another