Browse code

rr: parse route headers if not parsed already (instead of aborting)

Ovidiu Sas authored on 25/02/2019 20:56:44
Showing 1 changed files
... ...
@@ -998,7 +998,19 @@ int redo_route_params(sip_msg_t *msg)
998 998
 		return -1;
999 999
 	}
1000 1000
 
1001
-	if(msg->route==NULL || msg->route->parsed==NULL) {
1001
+	if(msg->route==NULL) {
1002
+		return -1;
1003
+	}
1004
+
1005
+	if(msg->route->parsed==NULL) {
1006
+		if (parse_rr(msg->route) < 0) {
1007
+			LM_ERR("failed to parse Route HF\n");
1008
+			return -1;
1009
+		}
1010
+	}
1011
+
1012
+	if(msg->route->parsed==NULL) {
1013
+		LM_ERR("NULL parsed Route header\n");
1002 1014
 		return -1;
1003 1015
 	}
1004 1016