Browse Source

@ruri forces parsing the URI.

The entire RURI value is rearly used as it is,
rather its subparts are important. The result of this
patch is that for example @ruri.user and @ruri.host
cause one parsing instead of two when the RURI has
not been parsed yet.
Miklos Tirpak 16 years ago
parent
commit
3e004ccadd
1 changed files with 10 additions and 0 deletions
  1. 10 0
      select_core.c

+ 10 - 0
select_core.c

@@ -69,6 +69,16 @@
 
 int select_ruri(str* res, select_t* s, struct sip_msg* msg)
 {
+	/* Parse the RURI even if it is not needed right now
+	 * because the nested select calls can access the
+	 * parsed URI in this case.
+	 * Go ahead even if the parsing fails, so the
+	 * value of the broken RURI can be accessed at least.
+	 * Subsequent select calls will fail when they try to parse
+	 * the URI anyway. (Miklos)
+	 */
+	parse_sip_msg_uri(msg);
+
 	if (msg->parsed_uri_ok)
 		select_uri_p = &msg->parsed_uri;