[sr-dev] git:master:e238567d: domainpolicy: check if set dst uri fails

Daniel-Constantin Mierla miconda at gmail.com
Thu Jul 27 11:35:20 CEST 2017


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-07-27T11:11:36+02:00

domainpolicy: check if set dst uri fails

---

Modified: src/modules/domainpolicy/domainpolicy.c

---

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

---

diff --git a/src/modules/domainpolicy/domainpolicy.c b/src/modules/domainpolicy/domainpolicy.c
index 003a757671..7cf7ac2d55 100644
--- a/src/modules/domainpolicy/domainpolicy.c
+++ b/src/modules/domainpolicy/domainpolicy.c
@@ -1018,7 +1018,10 @@ int dp_apply_policy(struct sip_msg* _msg, char* _s1, char* _s2) {
 	duri_str.s = (char *)&(duri[0]);
 	duri_str.len = at - duri_str.s;
 	LM_DBG("new DURI is '%.*s'\n",duri_str.len, ZSW(duri_str.s));
-	set_dst_uri(_msg, &duri_str);
+	if(set_dst_uri(_msg, &duri_str)<0) {
+		LM_ERR("failed to se dst uri\n");
+		return -1;
+	}
 	/* dst_uri changes, so it makes sense to re-use the current uri for
 		forking */
 	ruri_mark_new(); /* re-use uri for serial forking */




More information about the sr-dev mailing list