Browse code

@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 authored on 15/05/2009 08:04:50
Showing 1 changed files
... ...
@@ -69,6 +69,16 @@
69 69
 
70 70
 int select_ruri(str* res, select_t* s, struct sip_msg* msg)
71 71
 {
72
+	/* Parse the RURI even if it is not needed right now
73
+	 * because the nested select calls can access the
74
+	 * parsed URI in this case.
75
+	 * Go ahead even if the parsing fails, so the
76
+	 * value of the broken RURI can be accessed at least.
77
+	 * Subsequent select calls will fail when they try to parse
78
+	 * the URI anyway. (Miklos)
79
+	 */
80
+	parse_sip_msg_uri(msg);
81
+
72 82
 	if (msg->parsed_uri_ok)
73 83
 		select_uri_p = &msg->parsed_uri;
74 84