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

tm: print warn messages when failing to update r-uri and path

Daniel-Constantin Mierla 8 жил өмнө
parent
commit
9f9e3162cd

+ 1 - 1
modules/tm/t_fwd.c

@@ -1013,7 +1013,7 @@ int add_uac_dns_fallback(struct cell *t, struct sip_msg* msg,
 							"branches exceeded\n");
 				if (lock_replies)
 					UNLOCK_REPLIES(t);
-					ret=ser_error=E_TOO_MANY_BRANCHES;
+				ret=ser_error=E_TOO_MANY_BRANCHES;
 				return ret;
 			}
 			/* copy the dns handle into the new uac */

+ 6 - 2
modules/tm/t_serial.c

@@ -548,7 +548,9 @@ int t_next_contacts(struct sip_msg* msg, char* key, char* value)
 	}
 
 	/* Rewrite Request-URI */
-	rewrite_uri(msg, &uri);
+	if(rewrite_uri(msg, &uri)<0) {
+		LM_WARN("failed to rewrite r-uri\n");
+	}
 
 	if (dst_uri.len) {
 		set_dst_uri(msg, &dst_uri);
@@ -557,7 +559,9 @@ int t_next_contacts(struct sip_msg* msg, char* key, char* value)
 	}
 
 	if (path.len) {
-		set_path_vector(msg, &path);
+		if(set_path_vector(msg, &path)<0) {
+			LM_WARN("failed to set path vector\n");
+		}
 	} else {
 		reset_path_vector(msg);
 	}