Module: sip-router
Branch: master
Commit: 365a60772de9c1d2f19ecf52b12f6d75b348e996
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=365a607…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: Tue May 20 16:22:58 2014 +0300
modules/siputils: generate error message if parsing of is_gruu() uri fails
---
modules/siputils/sipops.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/modules/siputils/sipops.c b/modules/siputils/sipops.c
index 357d92c..5394458 100644
--- a/modules/siputils/sipops.c
+++ b/modules/siputils/sipops.c
@@ -92,7 +92,7 @@ int w_cmp_aor(struct sip_msg *msg, char *uri1, char *uri2)
int w_is_gruu(sip_msg_t *msg, char *uri1, char *p2)
{
- str s1;
+ str s1, *s2;
sip_uri_t turi;
sip_uri_t *puri;
@@ -103,12 +103,17 @@ int w_is_gruu(sip_msg_t *msg, char *uri1, char *p2)
LM_ERR("cannot get first parameter\n");
return -8;
}
- if(parse_uri(s1.s, s1.len, &turi)!=0)
- return -1;
+ if(parse_uri(s1.s, s1.len, &turi)!=0) {
+ LM_ERR("parsing of uri '%.*s' failed\n", s1.len, s1.s);
+ return -1;
+ }
puri = &turi;
} else {
- if(parse_sip_msg_uri(msg)<0)
- return -1;
+ if(parse_sip_msg_uri(msg)<0) {
+ s2 = GET_RURI(msg);
+ LM_ERR("parsing of uri '%.*s' failed\n", s2->len,
s2->s);
+ return -1;
+ }
puri = &msg->parsed_uri;
}
if(puri->gr.s!=NULL)