get_ipaddr_by_peer_ip refined

v6.03_dev
YuQing 2019-11-14 21:02:02 +08:00
parent 21c52cf406
commit 41855a4247
1 changed files with 2 additions and 2 deletions

View File

@ -651,8 +651,8 @@ const char *fdfs_get_ipaddr_by_peer_ip(const FDFSMultiIP *ip_addrs,
} }
ip_type = fdfs_get_ip_type(client_ip); ip_type = fdfs_get_ip_type(client_ip);
index = ip_addrs->ips[FDFS_MULTI_IP_INDEX_INNER].type == ip_type ? index = ip_addrs->ips[FDFS_MULTI_IP_INDEX_OUTER].type == ip_type ?
FDFS_MULTI_IP_INDEX_INNER : FDFS_MULTI_IP_INDEX_OUTER; FDFS_MULTI_IP_INDEX_OUTER : FDFS_MULTI_IP_INDEX_INNER;
return ip_addrs->ips[index].address; return ip_addrs->ips[index].address;
} }