Skip to content

Commit

Permalink
enum: print out malformed uri in enum_query()
Browse files Browse the repository at this point in the history
- previous error message did not show up the username part of r-uri.
  therefor debugging was difficult.

(cherry picked from commit fd3c30f)
  • Loading branch information
boettner authored and miconda committed May 9, 2016
1 parent aa39e12 commit c29e524
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions modules/enum/enum.c
Expand Up @@ -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;

Expand Down

0 comments on commit c29e524

Please sign in to comment.