]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd-mirror: decode_client_meta should return false on error
authorMykola Golub <mgolub@mirantis.com>
Tue, 26 Jul 2016 13:10:30 +0000 (16:10 +0300)
committerJason Dillaman <dillaman@redhat.com>
Tue, 11 Oct 2016 16:40:48 +0000 (12:40 -0400)
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit cd5eb36e98f46a1d84bddeafa4e7dcad415aa4a2)

src/tools/rbd_mirror/image_replayer/BootstrapRequest.cc

index 574023a5267fdc1837ae973ead93dbf0c56213cf..9fd57339f46342d9cc2cf1c99d581307848ab920 100644 (file)
@@ -646,14 +646,14 @@ bool BootstrapRequest<I>::decode_client_meta() {
     ::decode(client_data, it);
   } catch (const buffer::error &err) {
     derr << ": failed to decode client meta data: " << err.what() << dendl;
-    return true;
+    return false;
   }
 
   librbd::journal::MirrorPeerClientMeta *client_meta =
     boost::get<librbd::journal::MirrorPeerClientMeta>(&client_data.client_meta);
   if (client_meta == nullptr) {
     derr << ": unknown peer registration" << dendl;
-    return true;
+    return false;
   } else if (!client_meta->image_id.empty()) {
     // have an image id -- use that to open the image
     m_local_image_id = client_meta->image_id;