Module: kamailio
Branch: master
Commit: fd3c30f981d97622fb99f2122ce0bc950774edfb
URL:
https://github.com/kamailio/kamailio/commit/fd3c30f981d97622fb99f2122ce0bc9…
Author: Jonas Böttner <boettner(a)sipgate.de>
Committer: Jonas Böttner <boettner(a)sipgate.de>
Date: 2016-05-02T14:20:25+02:00
enum: print out malformed uri in enum_query()
- previous error message did not show up the username part of r-uri.
therefor debugging was difficult.
---
Modified: modules/enum/enum.c
---
Diff:
https://github.com/kamailio/kamailio/commit/fd3c30f981d97622fb99f2122ce0bc9…
Patch:
https://github.com/kamailio/kamailio/commit/fd3c30f981d97622fb99f2122ce0bc9…
---
diff --git a/modules/enum/enum.c b/modules/enum/enum.c
index 2c3620f..1abd962 100644
--- a/modules/enum/enum.c
+++ b/modules/enum/enum.c
@@ -762,14 +762,15 @@ int enum_query(struct sip_msg* _msg, str* suffix, str* service)
return -1;
}
+ user_s = _msg->parsed_uri.user.s;
+ user_len = _msg->parsed_uri.user.len;
+
if (is_e164(&(_msg->parsed_uri.user)) == -1) {
- LM_ERR("R-URI user is not an E164 number\n");
+ LM_ERR("R-URI user '<%.*s>' is not an E164 number\n",
+ user_len, user_s);
return -1;
}
- user_s = _msg->parsed_uri.user.s;
- user_len = _msg->parsed_uri.user.len;
-
memcpy(&(string[0]), user_s, user_len);
string[user_len] = (char)0;