Module: sip-router
Branch: master
Commit: 07689d3a865a0a5f77e427ef2771418da7d18306
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=07689d3…
Author: Jan Janak <jan(a)iptel.org>
Committer: Jan Janak <jan(a)iptel.org>
Date: Sun Mar 15 17:24:04 2009 +0100
Kamailio compatibility: function reset_dst_uri
---
parser/msg_parser.c | 10 ++++++++++
parser/msg_parser.h | 2 ++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/parser/msg_parser.c b/parser/msg_parser.c
index e50d3ff..5cfbd7c 100644
--- a/parser/msg_parser.c
+++ b/parser/msg_parser.c
@@ -728,3 +728,13 @@ int set_dst_uri(struct sip_msg* msg, str* uri)
}
return 0;
}
+
+
+void reset_dst_uri(struct sip_msg* msg)
+{
+ if(msg->dst_uri.s != 0) {
+ pkg_free(msg->dst_uri.s);
+ }
+ msg->dst_uri.s = 0;
+ msg->dst_uri.len = 0;
+}
diff --git a/parser/msg_parser.h b/parser/msg_parser.h
index 64d1310..4b18ed5 100644
--- a/parser/msg_parser.h
+++ b/parser/msg_parser.h
@@ -407,5 +407,7 @@ inline static char* get_body(struct sip_msg *msg)
*/
int set_dst_uri(struct sip_msg* msg, str* uri);
+/* If the dst_uri is set to an URI then reset it */
+void reset_dst_uri(struct sip_msg* msg);
#endif