Fix verbosity checks on deserialization.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 13 Jul 2016 18:59:25 +0000 (20:59 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 13 Jul 2016 18:59:47 +0000 (20:59 +0200)
httpinput.cpp
input.cpp

index 49333c5..a45a4ba 100644 (file)
@@ -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()
index 25012a6..7f95b26 100644 (file)
--- 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;