libcephfs: use entity_addr_t::get_sockaddr_storage()

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2016-05-06 09:46:55 -04:00
parent 0038d362d3
commit b88e41ab53

View File

@ -1218,7 +1218,7 @@ extern "C" int ceph_get_osd_addr(struct ceph_mount_info *cmount, int osd,
if (ret < 0) if (ret < 0)
return ret; return ret;
memcpy(addr, &address.ss_addr(), sizeof(*addr)); *addr = address.get_sockaddr_storage();
return 0; return 0;
} }
@ -1241,7 +1241,7 @@ extern "C" int ceph_get_file_stripe_address(struct ceph_mount_info *cmount, int
return r; return r;
for (i = 0; i < (unsigned)naddr && i < address.size(); i++) for (i = 0; i < (unsigned)naddr && i < address.size(); i++)
memcpy(&addr[i], &address[i].ss_addr(), sizeof(*addr)); addr[i] = address[i].get_sockaddr_storage();
/* naddr == 0: drop through and return actual size */ /* naddr == 0: drop through and return actual size */
if (naddr && (address.size() > (unsigned)naddr)) if (naddr && (address.size() > (unsigned)naddr))