Browse code

core: dset minor cleanups

- get_request_uri() is now inline and uses GET_RURI
- DBG msg removed

Andrei Pelinescu-Onciul authored on 31/10/2009 09:31:18
Showing 2 changed files
... ...
@@ -436,24 +436,6 @@ qvalue_t get_ruri_q(void)
436 436
 
437 437
 
438 438
 
439
-/*
440
- * Get actual Request-URI
441
- */
442
-int get_request_uri(struct sip_msg* _m, str* _u)
443
-{
444
-	     /* Use new_uri if present */
445
-	if (_m->new_uri.s) {
446
-		_u->s = _m->new_uri.s;
447
-		_u->len = _m->new_uri.len;
448
-	} else {
449
-		_u->s = _m->first_line.u.request.uri.s;
450
-		_u->len = _m->first_line.u.request.uri.len;
451
-	}
452
-
453
-	return 0;
454
-}
455
-
456
-
457 439
 /*
458 440
  * Rewrite Request-URI
459 441
  */
... ...
@@ -478,8 +460,6 @@ int rewrite_uri(struct sip_msg* _m, str* _s)
478 460
         _m->new_uri.s = buf;
479 461
         _m->new_uri.len = _s->len;
480 462
 
481
-        DBG("rewrite_uri: Rewriting Request-URI with '%.*s'\n", _s->len, 
482
-																		   buf);
483 463
         return 1;
484 464
 }
485 465
 
... ...
@@ -31,8 +31,8 @@
31 31
 #include "ip_addr.h"
32 32
 #include "qvalue.h"
33 33
 #include "flags.h"
34
+#include "parser/msg_parser.h"
34 35
 
35
-struct sip_msg;
36 36
 
37 37
 extern unsigned int nr_branches;
38 38
 
... ...
@@ -118,7 +118,19 @@ void set_ruri_q(qvalue_t q);
118 118
  */
119 119
 qvalue_t get_ruri_q(void);
120 120
 
121
-int get_request_uri(struct sip_msg* _m, str* _u);
121
+
122
+
123
+/*
124
+ * Get actual Request-URI
125
+ */
126
+inline static int get_request_uri(struct sip_msg* _m, str* _u)
127
+{
128
+	*_u=*GET_RURI(_m);
129
+	return 0;
130
+}
131
+
132
+
133
+
122 134
 int rewrite_uri(struct sip_msg* _m, str* _s);
123 135
 
124 136
 /**