From cb7371a29fd92d3f7dfff29bae185a54d7f99951 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Wed, 13 Jul 2016 20:59:25 +0200 Subject: [PATCH] Fix verbosity checks on deserialization. --- httpinput.cpp | 7 ++++++- input.cpp | 4 +--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/httpinput.cpp b/httpinput.cpp index 49333c5..a45a4ba 100644 --- a/httpinput.cpp +++ b/httpinput.cpp @@ -76,7 +76,9 @@ HTTPInput::HTTPInput(const InputProto &serialized) http_header(serialized.http_header()), stream_header(serialized.stream_header()), has_metacube_header(serialized.has_metacube_header()), - sock(serialized.sock()) + sock(serialized.sock()), + num_connection_attempts(0), + suppress_logging(false) { pending_data.resize(serialized.pending_data().size()); memcpy(&pending_data[0], serialized.pending_data().data(), serialized.pending_data().size()); @@ -93,6 +95,9 @@ HTTPInput::HTTPInput(const InputProto &serialized) } else { stats.connect_time = time(NULL); } + + last_verbose_connection.tv_sec = -3600; + last_verbose_connection.tv_nsec = 0; } void HTTPInput::close_socket() diff --git a/input.cpp b/input.cpp index 25012a6..7f95b26 100644 --- a/input.cpp +++ b/input.cpp @@ -104,9 +104,7 @@ Input *create_input(const string &url, Input::Encoding encoding) return new HTTPInput(url, encoding); } if (protocol == "udp") { - if (encoding == Input::INPUT_ENCODING_METACUBE) { - return NULL; - } + // encoding is ignored; it's never Metacube. return new UDPInput(url); } return NULL; -- 2.39.2