소스 검색

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');
 	}