From 830760903e0188d16a87c2b270794c2e675d0976 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 9 Oct 2018 17:08:56 -0500 Subject: [PATCH] messages/MForward: drop unused ctor Signed-off-by: Sage Weil --- src/messages/MForward.h | 15 --------------- src/mon/Monitor.cc | 4 +++- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/src/messages/MForward.h b/src/messages/MForward.h index 61ea669244572..1c9405832fa22 100644 --- a/src/messages/MForward.h +++ b/src/messages/MForward.h @@ -44,21 +44,6 @@ public: MForward() : MessageInstance(MSG_FORWARD, HEAD_VERSION, COMPAT_VERSION), tid(0), con_features(0), msg(NULL) {} - //the message needs to have caps filled in! - MForward(uint64_t t, PaxosServiceMessage *m, uint64_t feat) : - MessageInstance(MSG_FORWARD, HEAD_VERSION, COMPAT_VERSION), - tid(t), msg(NULL) { - client_type = m->get_source().type(); - client_addrs = m->get_source_addrs(); - if (auto con = m->get_connection()) { - client_socket_addr = con->get_peer_socket_addr(); - } - client_caps = m->get_session()->caps; - con_features = feat; - // we may need to reencode for the target mon - msg->clear_payload(); - msg = (PaxosServiceMessage*)m->get(); - } MForward(uint64_t t, PaxosServiceMessage *m, uint64_t feat, const MonCap& caps) : MessageInstance(MSG_FORWARD, HEAD_VERSION, COMPAT_VERSION), diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 1c6fba4082d50..8d8afd4756cca 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -3884,7 +3884,9 @@ void Monitor::resend_routed_requests() rr->op->mark_event("resend forwarded message to leader"); dout(10) << " resend to mon." << mon << " tid " << rr->tid << " " << *req << dendl; - MForward *forward = new MForward(rr->tid, req, rr->con_features, + MForward *forward = new MForward(rr->tid, + req, + rr->con_features, rr->session->caps); req->put(); // forward takes its own ref; drop ours. forward->client_type = rr->con->get_peer_type(); -- 2.39.5