2
0
Эх сурвалжийг харах

Replacing @select=="" with !@select, because the latter is safer.
(The select must exist with empty string value in order to evaluate
@select=="" as true.)

Miklos Tirpak 17 жил өмнө
parent
commit
25b2e5c05a
2 өөрчлөгдсөн 3 нэмэгдсэн , 3 устгасан
  1. 1 1
      etc/ser-oob.cfg
  2. 2 2
      etc/ser.cfg

+ 1 - 1
etc/ser-oob.cfg

@@ -590,7 +590,7 @@ route[OPTIONS_REPLY]
 {
 	# if it is an OPTIONS without a username in the RURI but one
 	# of our IPs answer directly statelessly
-	if (method=="OPTIONS" && @ruri.user=="" && (uri==myself||$t.did)) {
+	if (method=="OPTIONS" && !@ruri.user && (uri==myself||$t.did)) {
 		options_reply();
 		drop;
 	}

+ 2 - 2
etc/ser.cfg

@@ -198,7 +198,7 @@ route[FORWARD]
 
 	# if this is an initial INVITE (without a To-tag) we might try another
 	# (forwarding or voicemail) target after receiving an error
-	if (method=="INVITE" && @to.tag=="") {
+	if (method=="INVITE" && !@to.tag) {
 		t_on_failure("FAILURE_ROUTE");
 	}
 
@@ -230,7 +230,7 @@ route[INIT]
 
 	# lets account all initial INVITEs
 	# further in-dialog requests are accounted by a RR cookie (see below)
-	if (method=="INVITE" && @to.tag=="") {
+	if (method=="INVITE" && !@to.tag) {
 		setflag(FLAG_ACC);
 	}
 }