Browse Source

core: dset minor cleanups

- get_request_uri() is now inline and uses GET_RURI
- DBG msg removed
(cherry picked from commit cbf1b7793d1b3f7d44b38144608905b90568251b)
Andrei Pelinescu-Onciul 16 years ago
parent
commit
bff36ca834
2 changed files with 14 additions and 22 deletions
  1. 0 20
      dset.c
  2. 14 2
      dset.h

+ 0 - 20
dset.c

@@ -436,24 +436,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
  */
@@ -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;
 }
 

+ 14 - 2
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);
 
 /**