]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/librbd/exclusive_lock: use entity_addr_t::parse, not inet_pton
authorSage Weil <sage@redhat.com>
Mon, 20 Jun 2016 13:16:19 +0000 (09:16 -0400)
committerSage Weil <sage@redhat.com>
Tue, 18 Oct 2016 20:40:11 +0000 (16:40 -0400)
Otherwise the entity_addr_t type doesn't get set.

Signed-off-by: Sage Weil <sage@redhat.com>
src/test/librbd/exclusive_lock/test_mock_AcquireRequest.cc

index 65d0559d77335030ad0447770cd1b98adb05e919..ee4548821cc93a2c3fedf1999ebb2daaf3038dfc 100644 (file)
@@ -187,9 +187,7 @@ public:
     } else {
       entity_name_t entity(locker_entity);
       entity_addr_t entity_addr;
-      entity_addr.set_family(AF_INET);
-      inet_pton(AF_INET, locker_address.c_str(),
-               &entity_addr.in4_addr().sin_addr);
+      entity_addr.parse(locker_address.c_str(), NULL);
 
       cls_lock_get_info_reply reply;
       if (r != -ENOENT) {