[sr-dev] git:4.0: tm: reset faked request fields that can be set in failure handlers

Daniel-Constantin Mierla miconda at gmail.com
Thu Sep 19 14:11:45 CEST 2013


Module: sip-router
Branch: 4.0
Commit: 1550ce9a0ffa012daf413a0abee5d80bd7cc60de
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1550ce9a0ffa012daf413a0abee5d80bd7cc60de

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Thu Sep 19 14:05:21 2013 +0200

tm: reset faked request fields that can be set in failure handlers

---

 modules/tm/t_reply.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/modules/tm/t_reply.c b/modules/tm/t_reply.c
index b79200b..c36daf6 100644
--- a/modules/tm/t_reply.c
+++ b/modules/tm/t_reply.c
@@ -932,6 +932,7 @@ error00:
 	if (faked_req->dst_uri.s) {
 		pkg_free(faked_req->dst_uri.s);
 		faked_req->dst_uri.s = 0;
+		faked_req->dst_uri.len = 0;
 	}
 error01:
 	return 0;
@@ -975,6 +976,9 @@ void free_faked_req(struct sip_msg *faked_req, struct cell *t)
 			faked_req->body->free(&faked_req->body);
 		faked_req->body = 0;
 	}
+	/* free sip_msg_t fileds that can be set in pkg */
+	reset_path_vector(faked_req);
+	reset_instance(faked_req);
 }
 
 




More information about the sr-dev mailing list