diff --git a/transport/server.cc b/transport/server.cc index 4b81b19b36..9f71b60258 100644 --- a/transport/server.cc +++ b/transport/server.cc @@ -266,11 +266,7 @@ cql_server::unadvertise_connection(shared_ptr raw_co unsigned cql_server::connection::frame_size() const { - if (_version < 3) { - return 8; - } else { - return 9; - } + return 9; } cql_binary_frame_v3 @@ -280,17 +276,6 @@ cql_server::connection::parse_frame(temporary_buffer buf) const { } cql_binary_frame_v3 v3; switch (_version) { - case 1: - case 2: { - cql_binary_frame_v1 raw = read_unaligned(buf.get()); - auto cooked = net::ntoh(raw); - v3.version = cooked.version; - v3.flags = cooked.flags; - v3.opcode = cooked.opcode; - v3.stream = cooked.stream; - v3.length = cooked.length; - break; - } case 3: case 4: { cql_binary_frame_v3 raw = read_unaligned(buf.get()); @@ -319,7 +304,7 @@ cql_server::connection::read_frame() { } _version = buf[0]; init_cql_serialization_format(); - if (_version < 1 || _version > current_version) { + if (_version < 3 || _version > current_version) { auto client_version = _version; _version = current_version; throw exceptions::protocol_exception(format("Invalid or unsupported protocol version: {:d}", client_version)); diff --git a/transport/server.hh b/transport/server.hh index d2437c39b6..0020359952 100644 --- a/transport/server.hh +++ b/transport/server.hh @@ -77,19 +77,6 @@ enum cql_frame_flags { warning = 0x08, }; -struct [[gnu::packed]] cql_binary_frame_v1 { - uint8_t version; - uint8_t flags; - uint8_t stream; - uint8_t opcode; - net::packed length; - - template - void adjust_endianness(Adjuster a) { - return a(length); - } -}; - struct [[gnu::packed]] cql_binary_frame_v3 { uint8_t version; uint8_t flags;