[sr-dev] git:5.0:3bfc9d49: tsilo: check return code for parse_uri()

Federico Cabiddu federico.cabiddu at gmail.com
Mon Jul 24 15:17:14 CEST 2017


Module: kamailio
Branch: 5.0
Commit: 3bfc9d4955cf3edd64fe29aa3e88d23609360209
URL: https://github.com/kamailio/kamailio/commit/3bfc9d4955cf3edd64fe29aa3e88d23609360209

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Federico Cabiddu <federico.cabiddu at gmail.com>
Date: 2017-07-24T15:18:29+02:00

tsilo: check return code for parse_uri()

(cherry picked from commit a19a06f6c302a7fbac9b137cc1558d47730ead2f)

---

Modified: src/modules/tsilo/ts_append.c

---

Diff:  https://github.com/kamailio/kamailio/commit/3bfc9d4955cf3edd64fe29aa3e88d23609360209.diff
Patch: https://github.com/kamailio/kamailio/commit/3bfc9d4955cf3edd64fe29aa3e88d23609360209.patch

---

diff --git a/src/modules/tsilo/ts_append.c b/src/modules/tsilo/ts_append.c
index 0076634109..e6e27e40cc 100644
--- a/src/modules/tsilo/ts_append.c
+++ b/src/modules/tsilo/ts_append.c
@@ -50,9 +50,12 @@ int ts_append(struct sip_msg* msg, str *ruri, char *table) {
 
 	if (use_domain) {
 		t_uri = ruri;
-	}
-	else {
-		parse_uri(ruri->s, ruri->len, &p_uri);
+	} else {
+		if(parse_uri(ruri->s, ruri->len, &p_uri)<0) {
+			LM_ERR("failed to parse uri %.*s\n", ruri->len, ruri->s);
+			unlock_entry_by_ruri(ruri);
+			return -1;
+		}
 		t_uri = &p_uri.user;
 	}
 




More information about the sr-dev mailing list