[sr-dev] git:master:9f9e3162: tm: print warn messages when failing to update r-uri and path

Daniel-Constantin Mierla miconda at gmail.com
Fri Nov 4 12:31:47 CET 2016


Module: kamailio
Branch: master
Commit: 9f9e3162cd92b564323c9e77689f57c9dd0600bc
URL: https://github.com/kamailio/kamailio/commit/9f9e3162cd92b564323c9e77689f57c9dd0600bc

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2016-11-04T11:57:55+01:00

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

---

Modified: modules/tm/t_fwd.c
Modified: modules/tm/t_serial.c

---

Diff:  https://github.com/kamailio/kamailio/commit/9f9e3162cd92b564323c9e77689f57c9dd0600bc.diff
Patch: https://github.com/kamailio/kamailio/commit/9f9e3162cd92b564323c9e77689f57c9dd0600bc.patch

---

diff --git a/modules/tm/t_fwd.c b/modules/tm/t_fwd.c
index 1586ec3..f60d5ee 100644
--- a/modules/tm/t_fwd.c
+++ b/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 */
diff --git a/modules/tm/t_serial.c b/modules/tm/t_serial.c
index 2fb734f..85d0247 100644
--- a/modules/tm/t_serial.c
+++ b/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);
 	}




More information about the sr-dev mailing list