[sr-dev] git:3.1: rls: be sure From and To URIs are parsed

Daniel-Constantin Mierla miconda at gmail.com
Sat Mar 26 14:32:17 CET 2011


Module: sip-router
Branch: 3.1
Commit: 48fad52963344561e8bb85fa882811dfefc65dfe
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=48fad52963344561e8bb85fa882811dfefc65dfe

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Sat Mar 26 14:24:27 2011 +0100

rls: be sure From and To URIs are parsed

- if RLS SUBSCRIBE is handled before any other module needed From or To
  URIs, then the structures were not filled, resulting in using empty
  username and domain to locate the RLS document
- reported by Peter Dunkley
(cherry picked from commit 99077e7f90b1bf44ab336f16591399db57bc6978)

---

 modules_k/rls/subscribe.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/modules_k/rls/subscribe.c b/modules_k/rls/subscribe.c
index 6fa46c1..a827623 100644
--- a/modules_k/rls/subscribe.c
+++ b/modules_k/rls/subscribe.c
@@ -36,6 +36,7 @@
 #include "../../lib/kcore/cmpapi.h"
 #include "../../lib/kcore/hash_func.h"
 #include "../../lib/kcore/parse_supported.h"
+#include "../../lib/kcore/parser_helpers.h"
 #include "../../parser/msg_parser.h"
 #include "../../parser/parse_event.h"
 #include "../../parser/parse_expires.h"
@@ -432,7 +433,7 @@ int rls_handle_subscribe(struct sip_msg* msg, char* s1, char* s2)
 		return 0;
 	}
 	/* check for To and From headesr */
-	if(parse_to_header(msg)<0 || parse_from_header(msg)<0)
+	if(parse_to_uri(msg)<0 || parse_from_uri(msg)<0)
 	{
 		LM_ERR("failed to find To or From headers\n");
 		if (slb.freply(msg, 400, &pu_400_rpl) < 0)




More information about the sr-dev mailing list