Jelajahi Sumber

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
Daniel-Constantin Mierla 14 tahun lalu
induk
melakukan
99077e7f90
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  1. 2 1
      modules_k/rls/subscribe.c

+ 2 - 1
modules_k/rls/subscribe.c

@@ -36,6 +36,7 @@
 #include "../../lib/kcore/cmpapi.h"
 #include "../../lib/kcore/cmpapi.h"
 #include "../../lib/kcore/hash_func.h"
 #include "../../lib/kcore/hash_func.h"
 #include "../../lib/kcore/parse_supported.h"
 #include "../../lib/kcore/parse_supported.h"
+#include "../../lib/kcore/parser_helpers.h"
 #include "../../parser/msg_parser.h"
 #include "../../parser/msg_parser.h"
 #include "../../parser/parse_event.h"
 #include "../../parser/parse_event.h"
 #include "../../parser/parse_expires.h"
 #include "../../parser/parse_expires.h"
@@ -432,7 +433,7 @@ int rls_handle_subscribe(struct sip_msg* msg, char* s1, char* s2)
 		return 0;
 		return 0;
 	}
 	}
 	/* check for To and From headesr */
 	/* 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");
 		LM_ERR("failed to find To or From headers\n");
 		if (slb.freply(msg, 400, &pu_400_rpl) < 0)
 		if (slb.freply(msg, 400, &pu_400_rpl) < 0)