From cd5eb36e98f46a1d84bddeafa4e7dcad415aa4a2 Mon Sep 17 00:00:00 2001 From: Mykola Golub Date: Tue, 26 Jul 2016 16:10:30 +0300 Subject: [PATCH] rbd-mirror: decode_client_meta should return false on error Signed-off-by: Mykola Golub --- src/tools/rbd_mirror/image_replayer/BootstrapRequest.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/rbd_mirror/image_replayer/BootstrapRequest.cc b/src/tools/rbd_mirror/image_replayer/BootstrapRequest.cc index 4bed7562c5f..13004ebbe0d 100644 --- a/src/tools/rbd_mirror/image_replayer/BootstrapRequest.cc +++ b/src/tools/rbd_mirror/image_replayer/BootstrapRequest.cc @@ -728,14 +728,14 @@ bool BootstrapRequest::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(&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; -- 2.39.5