瀏覽代碼

something != "" can be true also when the left value does not exist

Miklos Tirpak 17 年之前
父節點
當前提交
1cfb258974
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      etc/ser-oob.cfg

+ 2 - 3
etc/ser-oob.cfg

@@ -646,7 +646,7 @@ route[RTPPROXY]
 	}
 
 	# turn the RTP proxy on for INVITEs and UPDATEs
-	if (((method=="INVITE" || method == "UPDATE") && @msg.body != "")  && !isflagset(FLAG_RTP_PROXY)) {
+	if (((method=="INVITE" || method == "UPDATE") && @msg.body)  && !isflagset(FLAG_RTP_PROXY)) {
 		force_rtp_proxy('r');
 		append_hf("P-RTP-Proxy: YES\r\n");
 		setflag(FLAG_RTP_PROXY);
@@ -1216,8 +1216,7 @@ onreply_route[REPLY_ROUTE]
 	# if a NAT is involved and this is the final positive reply
 	# which contains a body, start to use the RTP proxy
 	if (isflagset(FLAG_RTP_PROXY) &&
-		status=~"(18[03])|(2[0-9][0-9])" &&
-		@msg.body != "") {
+		status=~"(18[03])|(2[0-9][0-9])" && @msg.body) {
 		force_rtp_proxy('r');
 	}