Module: sip-router
Branch: kamailio_3.0
Commit: bff36ca8343070fcb51ac76a6f5fa21521ffd314
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=bff36ca…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sat Oct 31 10:31:18 2009 +0100
core: dset minor cleanups
- get_request_uri() is now inline and uses GET_RURI
- DBG msg removed
(cherry picked from commit cbf1b7793d1b3f7d44b38144608905b90568251b)
---
dset.c | 20 --------------------
dset.h | 16 ++++++++++++++--
2 files changed, 14 insertions(+), 22 deletions(-)
diff --git a/dset.c b/dset.c
index 08b67ba..77c3cea 100644
--- a/dset.c
+++ b/dset.c
@@ -437,24 +437,6 @@ qvalue_t get_ruri_q(void)
/*
- * Get actual Request-URI
- */
-int get_request_uri(struct sip_msg* _m, str* _u)
-{
- /* Use new_uri if present */
- if (_m->new_uri.s) {
- _u->s = _m->new_uri.s;
- _u->len = _m->new_uri.len;
- } else {
- _u->s = _m->first_line.u.request.uri.s;
- _u->len = _m->first_line.u.request.uri.len;
- }
-
- return 0;
-}
-
-
-/*
* Rewrite Request-URI
*/
int rewrite_uri(struct sip_msg* _m, str* _s)
@@ -478,8 +460,6 @@ int rewrite_uri(struct sip_msg* _m, str* _s)
_m->new_uri.s = buf;
_m->new_uri.len = _s->len;
- DBG("rewrite_uri: Rewriting Request-URI with '%.*s'\n",
_s->len,
- buf);
return 1;
}
diff --git a/dset.h b/dset.h
index f24f5c9..0943097 100644
--- a/dset.h
+++ b/dset.h
@@ -31,8 +31,8 @@
#include "ip_addr.h"
#include "qvalue.h"
#include "flags.h"
+#include "parser/msg_parser.h"
-struct sip_msg;
extern unsigned int nr_branches;
@@ -118,7 +118,19 @@ void set_ruri_q(qvalue_t q);
*/
qvalue_t get_ruri_q(void);
-int get_request_uri(struct sip_msg* _m, str* _u);
+
+
+/*
+ * Get actual Request-URI
+ */
+inline static int get_request_uri(struct sip_msg* _m, str* _u)
+{
+ *_u=*GET_RURI(_m);
+ return 0;
+}
+
+
+
int rewrite_uri(struct sip_msg* _m, str* _s);
/**