gaussianrecurrence commented on a change in pull request #815:
URL: https://github.com/apache/geode-native/pull/815#discussion_r809573438
##########
File path: cppcache/src/ClientProxyMembershipID.cpp
##########
@@ -77,21 +77,13 @@ ClientProxyMembershipID::ClientProxyMembershipID(
}
void ClientProxyMembershipID::initHostAddressVector(
- const ACE_INET_Addr& address) {
- if (address.get_type() == AF_INET6) {
- const auto socketAddress6 =
- static_cast<const struct sockaddr_in6*>(address.get_addr());
- auto socketAddress =
- reinterpret_cast<const uint8_t*>(&socketAddress6->sin6_addr);
- auto length = sizeof(socketAddress6->sin6_addr);
- m_hostAddr.assign(socketAddress, socketAddress + length);
+ const boost::asio::ip::address& address) {
+ if (address.is_v6()) {
+ auto bytes = address.to_v6().to_bytes();
+ m_hostAddr.assign(bytes.begin(), bytes.end());
Review comment:
Good point!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]