]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
msg/async: reset the rx stream handler in ::handle_read_frame_length_and_tag.
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Mon, 11 Feb 2019 00:09:48 +0000 (01:09 +0100)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 21 Feb 2019 20:58:33 +0000 (21:58 +0100)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/msg/async/ProtocolV2.cc

index 5a856d71c9793f77ba910e385551c565b9c6b365..6bdcdc5f81977896cfd9ec889a3e4d2c035953a7 100644 (file)
@@ -298,8 +298,6 @@ struct SignedEncryptedFrame : public PayloadFrame<T, Args...> {
 
   SignedEncryptedFrame(ProtocolV2 &protocol, char *payload, uint32_t length)
       : PayloadFrame<T, Args...>() {
-    protocol.session_stream_handlers.rx->reset_rx_handler();
-
     ceph::bufferlist bl;
     bl.push_back(buffer::create_static(length, payload));
 
@@ -480,7 +478,6 @@ struct MessageHeaderFrame
 
     if (protocol.auth_meta->is_mode_secure()) {
       ceph_assert(protocol.session_stream_handlers.rx);
-      protocol.session_stream_handlers.rx->reset_rx_handler();
 
       text = protocol.session_stream_handlers.rx->authenticated_decrypt_update(
        std::move(text), 8);
@@ -1336,6 +1333,11 @@ CtPtr ProtocolV2::handle_read_frame_length_and_tag(char *buffer, int r) {
     return _fault();
   }
 
+  if (auth_meta->is_mode_secure()) {
+    ceph_assert(session_stream_handlers.rx);
+    session_stream_handlers.rx->reset_rx_handler();
+  }
+
   bufferlist bl;
   bl.push_back(buffer::create_static(sizeof(uint32_t) * 2, buffer));
   try {