diff --git a/Common/Net/HTTPClient.cpp b/Common/Net/HTTPClient.cpp index 2888ed5012..2b7ec91b41 100644 --- a/Common/Net/HTTPClient.cpp +++ b/Common/Net/HTTPClient.cpp @@ -178,7 +178,7 @@ bool Connection::Connect(int maxTries, double timeout, bool *cancelConnect) { selectResult = select(maxfd, nullptr, &fds, nullptr, &tv); if (cancelConnect && *cancelConnect) { - WARN_LOG(HTTP, "connect(%d): cancelled (1)", sock); + WARN_LOG(HTTP, "connect: cancelled (1)"); break; } } @@ -197,7 +197,7 @@ bool Connection::Connect(int maxTries, double timeout, bool *cancelConnect) { } if (cancelConnect && *cancelConnect) { - WARN_LOG(HTTP, "connect(%d): cancelled (2)", sock); + WARN_LOG(HTTP, "connect: cancelled (2)"); break; } diff --git a/Common/Net/HTTPHeaders.h b/Common/Net/HTTPHeaders.h index b91b376411..4b112ab575 100644 --- a/Common/Net/HTTPHeaders.h +++ b/Common/Net/HTTPHeaders.h @@ -29,7 +29,7 @@ public: enum RequestType { SIMPLE, FULL, }; - RequestType type; + RequestType type = SIMPLE; enum Method { GET, HEAD, diff --git a/Common/Net/HTTPServer.cpp b/Common/Net/HTTPServer.cpp index f8bb760503..36f5b665bd 100644 --- a/Common/Net/HTTPServer.cpp +++ b/Common/Net/HTTPServer.cpp @@ -81,7 +81,7 @@ ServerRequest::~ServerRequest() { } delete in_; if (!out_->Empty()) { - ERROR_LOG(IO, "Output not empty - connection abort? (%s)", this->header_.resource); + WARN_LOG(IO, "Output not empty - connection abort? (%s) (%d bytes)", this->header_.resource, out_->BytesRemaining()); } delete out_; } diff --git a/Common/Net/Sinks.cpp b/Common/Net/Sinks.cpp index 86f3841e26..b6453bcf85 100644 --- a/Common/Net/Sinks.cpp +++ b/Common/Net/Sinks.cpp @@ -220,7 +220,7 @@ void InputSink::AccountDrain(size_t bytes) { } } -bool InputSink::Empty() { +bool InputSink::Empty() const { return valid_ == 0; } @@ -418,8 +418,12 @@ void OutputSink::AccountDrain(int bytes) { } } -bool OutputSink::Empty() { +bool OutputSink::Empty() const { return valid_ == 0; } -}; +int OutputSink::BytesRemaining() const { + return valid_; +} + +} // namespace net diff --git a/Common/Net/Sinks.h b/Common/Net/Sinks.h index e49630f57f..b997abf342 100644 --- a/Common/Net/Sinks.h +++ b/Common/Net/Sinks.h @@ -21,7 +21,7 @@ public: bool Skip(size_t bytes); void Discard(); - bool Empty(); + bool Empty() const; bool TryFill(); private: @@ -54,7 +54,8 @@ public: bool Flush(bool allowBlock = true); void Discard(); - bool Empty(); + bool Empty() const; + int BytesRemaining() const; private: void Drain(); @@ -72,4 +73,4 @@ private: size_t valid_; }; -}; +} // namespace net diff --git a/UI/RemoteISOScreen.cpp b/UI/RemoteISOScreen.cpp index 53266234db..11f4653a7f 100644 --- a/UI/RemoteISOScreen.cpp +++ b/UI/RemoteISOScreen.cpp @@ -118,6 +118,7 @@ bool RemoteISOConnectScreen::FindServer(std::string &resultHost, int &resultPort std::lock_guard guard(statusLock_); statusMessage_ = formatted; + INFO_LOG(SYSTEM, "Remote: %s", formatted.c_str()); }; http.SetUserAgent(StringFromFormat("PPSSPP/%s", PPSSPP_GIT_VERSION));