]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
messages/MForward: drop unused ctor
authorSage Weil <sage@redhat.com>
Tue, 9 Oct 2018 22:08:56 +0000 (17:08 -0500)
committerSage Weil <sage@redhat.com>
Sun, 14 Oct 2018 17:01:09 +0000 (12:01 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/messages/MForward.h
src/mon/Monitor.cc

index 61ea6692445725041313269d19cdb0197b2457ae..1c9405832fa22da82a65de4ee6f473a3332c90df 100644 (file)
@@ -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),
index 1c6fba4082d508d814c25eacd5ee67972d25f0e1..8d8afd4756cca32ccab12b2963cd7674563c9f76 100644 (file)
@@ -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();