From: Davin McCall Date: Wed, 1 Jan 2020 01:00:54 +0000 (+1000) Subject: Fix typo and use of hard-coded value X-Git-Tag: v0.8.1~4 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f8cc6785dfd1f987f403d6ed277e348dabbddc90;p=oweals%2Fdinit.git Fix typo and use of hard-coded value --- diff --git a/src/control.cc b/src/control.cc index ec8217d..061cce0 100644 --- a/src/control.cc +++ b/src/control.cc @@ -1014,9 +1014,9 @@ bool control_conn_t::data_ready() noexcept return false; } } - else if (rbuf.get_length() == 1024) { + else if (rbuf.get_length() == rbuf.get_size()) { // Too big packet - log(loglevel_t::WARN, "Received too-large control package; dropping connection"); + log(loglevel_t::WARN, "Received too-large control packet; dropping connection"); bad_conn_close = true; iob.set_watches(OUT_EVENTS); }