Skip to content

Commit

Permalink
Use ip_addr2a. Remove unused str_ip.
Browse files Browse the repository at this point in the history
(cherry picked from commit c60b4b5)
  • Loading branch information
wuhanck authored and liviuchircu committed Apr 30, 2018
1 parent b316568 commit ba99a4f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/permissions/address.c
Expand Up @@ -74,7 +74,7 @@ int reload_address_table(struct pm_part_struct *part_struct)
struct address_list **new_hash_table;
struct subnet *new_subnet_table;
int i, mask, proto, group, port, id;
struct ip_addr *ip_addr;
struct ip_addr *ip_addr;
struct net *subnet;
str str_pattern = {NULL,0}, str_info={NULL,0};
str str_src_ip, str_proto;
Expand Down Expand Up @@ -714,7 +714,7 @@ int check_src_addr_1(struct sip_msg* msg,
int get_source_group(struct sip_msg* msg, char *arg) {
int group = -1;
struct ip_addr *ip;
str str_ip, partition;
str partition;
pv_value_t pvt;
struct part_pvar *ppv;
struct pm_part_struct *ps;
Expand Down Expand Up @@ -759,8 +759,8 @@ int get_source_group(struct sip_msg* msg, char *arg) {
ip,
msg->rcv.src_port);
if (group == -1) {
LM_DBG("IP <%.*s:%u> not found in any group\n",
str_ip.len, str_ip.s, msg->rcv.src_port);
LM_DBG("IP <%s:%u> not found in any group\n",
ip_addr2a(ip), msg->rcv.src_port);
return -1;
}
}
Expand Down

0 comments on commit ba99a4f

Please sign in to comment.