Skip to content

Commit

Permalink
permissions: raise the proper error when the IP is not provided
Browse files Browse the repository at this point in the history
  • Loading branch information
razvancrainea committed Jan 23, 2015
1 parent f545ba0 commit b280f8d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/permissions/address.c
Expand Up @@ -448,6 +448,9 @@ int check_addr_6(struct sip_msg* msg,
LM_ERR("cannot get str_ip string\n");
return -1;
}
} else {
LM_ERR("source ip not provided!\n");
return -1;
}
if (str_ip.len <= 0 || !str_ip.s) {
LM_ERR("source ip is not set!\n");
Expand All @@ -456,7 +459,7 @@ int check_addr_6(struct sip_msg* msg,

ip = str2ip(&str_ip);
if (!ip) {
LM_ERR("source ip is not set!\n");
LM_ERR("invalid ip set <%.*s>!\n", str_ip.len, str_ip.s);
return -1;
}

Expand Down

0 comments on commit b280f8d

Please sign in to comment.