From: Mykola Golub Date: Tue, 26 Jul 2016 13:10:30 +0000 (+0300) Subject: rbd-mirror: decode_client_meta should return false on error X-Git-Tag: v11.0.1~316^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cd5eb36e98f46a1d84bddeafa4e7dcad415aa4a2;p=ceph.git rbd-mirror: decode_client_meta should return false on error Signed-off-by: Mykola Golub --- diff --git a/src/tools/rbd_mirror/image_replayer/BootstrapRequest.cc b/src/tools/rbd_mirror/image_replayer/BootstrapRequest.cc index 4bed7562c5f7..13004ebbe0d5 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;