Module: sip-router
Branch: 3.1
Commit: b7f6d47058ab5f42617f98732ed7f1428fa6e021
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b7f6d47…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Wed Jan 5 18:55:54 2011 +0100
core: defines to return parsed uri in From and To
(cherry picked from commit 8016597dbdb1e1aa03576c537a140c81cdc8beeb)
---
parser/parse_from.h | 2 ++
parser/parse_to.h | 4 +++-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/parser/parse_from.h b/parser/parse_from.h
index 6d35709..13083b1 100644
--- a/parser/parse_from.h
+++ b/parser/parse_from.h
@@ -39,6 +39,8 @@
#define free_from(_to_body_) free_to(_to_body_)
+#define GET_FROM_PURI(p_msg) \
+ (&((struct to_body*)(p_msg)->from->parsed)->parsed_uri)
/*
* From header field parser
diff --git a/parser/parse_to.h b/parser/parse_to.h
index 0c79a08..d71c4d2 100644
--- a/parser/parse_to.h
+++ b/parser/parse_to.h
@@ -57,8 +57,10 @@ struct to_body{
/* casting macro for accessing To body */
-#define get_to( p_msg) ((struct to_body*)(p_msg)->to->parsed)
+#define get_to(p_msg) ((struct to_body*)(p_msg)->to->parsed)
+#define GET_TO_PURI(p_msg) \
+ (&((struct to_body*)(p_msg)->to->parsed)->parsed_uri)
/*! \brief
* To header field parser