From 846e4fe358e5d053c86ce31a8036f934e713dd66 Mon Sep 17 00:00:00 2001 From: Jason Rhinelander Date: Fri, 17 Apr 2020 16:27:01 -0300 Subject: [PATCH] removed UNKNOWNCOMMAND patch (applied upstream) --- ...x-pre-1.1.0-UNKNOWNCOMMAND-detection.patch | 39 ------------------- debian/patches/series | 1 - 2 files changed, 40 deletions(-) delete mode 100644 debian/patches/0002-Fix-pre-1.1.0-UNKNOWNCOMMAND-detection.patch diff --git a/debian/patches/0002-Fix-pre-1.1.0-UNKNOWNCOMMAND-detection.patch b/debian/patches/0002-Fix-pre-1.1.0-UNKNOWNCOMMAND-detection.patch deleted file mode 100644 index 08cf712..0000000 --- a/debian/patches/0002-Fix-pre-1.1.0-UNKNOWNCOMMAND-detection.patch +++ /dev/null @@ -1,39 +0,0 @@ -From: Jason Rhinelander -Date: Tue, 14 Apr 2020 23:50:54 -0300 -Subject: Fix pre-1.1.0 UNKNOWNCOMMAND detection - -1.0.5 sends just ["UNKNOWNCOMMAND"], so the detection here was broken, -which resulted in a warning rather than just a debug log message. ---- - lokimq/proxy.cpp | 13 ++++++------- - 1 file changed, 6 insertions(+), 7 deletions(-) - -diff --git a/lokimq/proxy.cpp b/lokimq/proxy.cpp -index bbd7517..4672ccc 100644 ---- a/lokimq/proxy.cpp -+++ b/lokimq/proxy.cpp -@@ -560,18 +560,17 @@ bool LokiMQ::proxy_handle_builtin(size_t conn_index, std::vector - else if (is_error_response(cmd)) { - // These messages (FORBIDDEN, UNKNOWNCOMMAND, etc.) are sent in response to us trying to - // invoke something that doesn't exist or we don't have permission to access. These have -- // two forms (the latter is only sent by remotes running 1.0.6+). -+ // two forms (the latter is only sent by remotes running 1.1.0+). - // - ["XXX", "whatever.command"] - // - ["XXX", "REPLY", replytag] - // (ignoring the routing prefix on incoming commands). - // For the former, we log; for the latter we trigger the reply callback with a failure - -- if (parts.size() == (2 + incoming) && is_error_response(view(parts[1 + incoming]))) { -- // Something like ["UNKNOWNCOMMAND", "FORBIDDEN_SN"] which can happen because the remote -- // is running an older version that didn't understand the FORBIDDEN_SN (or whatever) -- // error reply that we sent them. We just ignore it because anything else could trigger -- // an infinite cycle. -- LMQ_LOG(debug, "Received [", cmd, ",", view(parts[1 + incoming]), "]; remote is probably an older lokimq. Ignoring."); -+ if (parts.size() == (1 + incoming) && cmd == "UNKNOWNCOMMAND") { -+ // pre-1.1.0 sent just a plain UNKNOWNCOMMAND (without the actual command); this was not -+ // useful, but also this response is *expected* for things 1.0.5 didn't understand, like -+ // FORBIDDEN_SN: so log it only at debug level and move on. -+ LMQ_LOG(debug, "Received plain UNKNOWNCOMMAND; remote is probably an older lokimq. Ignoring."); - return true; - } - diff --git a/debian/patches/series b/debian/patches/series index 787c035..76109be 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1 @@ 0002-Fully-version-library.patch -0002-Fix-pre-1.1.0-UNKNOWNCOMMAND-detection.patch