]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/async, v2: drop ceph_msg_header2 handling from ControlFrames.
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 7 Mar 2019 13:29:26 +0000 (14:29 +0100)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Sun, 10 Mar 2019 00:11:59 +0000 (01:11 +0100)
This is not needed anymore as MessageFrame class has been split
from the ControlFrame hierarchy - now it directly inherits from
the Frame root.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/msg/async/frames_v2.h

index e6eb4fb9f699296d27aaa6ad2ee18d294667ed67..b2b9d91047ae94be5d1a3a8cda33284214f24dce 100644 (file)
@@ -312,8 +312,6 @@ protected:
       for (const auto &elem : t) {
         encode(elem, this->get_payload_segment(), features);
       }
-    } else if constexpr (std::is_same<T, ceph_msg_header2 const>()) {
-      this->get_payload_segment().append((char *)&t, sizeof(t));
     } else {
       encode(t, this->get_payload_segment(), features);
     }
@@ -332,10 +330,6 @@ protected:
       for (uint32_t i = 0; i < size; ++i) {
         decode(t[i], ti);
       }
-    } else if constexpr (std::is_same<T, ceph_msg_header2>()) {
-      auto ptr = ti.get_current_ptr();
-      ti.advance(sizeof(T));
-      t = *(T *)ptr.raw_c_str();
     } else {
       decode(t, ti);
     }