]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
msg/async, v2: drop temp_buffer and limitations driven by it.
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Fri, 8 Mar 2019 12:14:52 +0000 (13:14 +0100)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Sun, 10 Mar 2019 00:12:00 +0000 (01:12 +0100)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/msg/async/ProtocolV2.cc
src/msg/async/ProtocolV2.h

index aa3b80865b202dbf9765c43f0e0af97b39502f03..919ec79124f1fce77a3231e2b339e9d176338009 100644 (file)
@@ -80,7 +80,6 @@ if(connection->interceptor) { \
 
 ProtocolV2::ProtocolV2(AsyncConnection *connection)
     : Protocol(2, connection),
-      temp_buffer(nullptr),
       state(NONE),
       peer_required_features(0),
       client_cookie(0),
@@ -96,11 +95,9 @@ ProtocolV2::ProtocolV2(AsyncConnection *connection)
       next_payload_len(0),
       next_tag(static_cast<Tag>(0)),
       keepalive(false) {
-  temp_buffer = new char[4096];
 }
 
 ProtocolV2::~ProtocolV2() {
-  delete[] temp_buffer;
 }
 
 void ProtocolV2::connect() {
@@ -809,9 +806,6 @@ CtPtr ProtocolV2::_handle_peer_banner(rx_buffer_t &&buffer, int r) {
     return _fault();
   }
 
-  ceph_assert(payload_len <= 4096);  // if we need more then we need to increase
-                                     // temp_buffer size as well
-
   next_payload_len = payload_len;
 
   INTERCEPT(state == BANNER_CONNECTING ? 5 : 6);
index f3e42368a1045013ef4f1c050351a2bc90a17a6b..52fa967d2cb481ab52f0be50e750c85a662f1a22 100644 (file)
@@ -68,7 +68,6 @@ public:
   ceph::crypto::onwire::rxtx_t session_stream_handlers;
 private:
   entity_name_t peer_name;
-  char *temp_buffer;
   State state;
   uint64_t peer_required_features;