Fix compilation without ENABLE_WEB_SERVICE (#6856)

This commit is contained in:
GPUCode 2023-08-06 22:23:53 +03:00 committed by GitHub
parent aaeba6759e
commit 0048e61fc7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 60 additions and 54 deletions

View file

@ -77,7 +77,6 @@ static std::pair<std::string, std::string> SplitUrl(const std::string& url) {
void Context::MakeRequest() {
ASSERT(state == RequestState::NotStarted);
#ifdef ENABLE_WEB_SERVICE
const auto& [host, path] = SplitUrl(url);
const auto client = std::make_unique<httplib::Client>(host);
SSL_CTX* ctx = client->ssl_context();
@ -128,10 +127,6 @@ void Context::MakeRequest() {
// TODO(B3N30): Verify this state on HW
state = RequestState::ReadyToDownloadContent;
}
#else
LOG_ERROR(Service_HTTP, "Tried to make request but WebServices is not enabled in this build");
state = RequestState::TimedOut;
#endif
}
void HTTP_C::Initialize(Kernel::HLERequestContext& ctx) {

View file

@ -17,12 +17,10 @@
#include <boost/serialization/unordered_map.hpp>
#include <boost/serialization/vector.hpp>
#include <boost/serialization/weak_ptr.hpp>
#ifdef ENABLE_WEB_SERVICE
#if defined(__ANDROID__)
#include <ifaddrs.h>
#endif
#include <httplib.h>
#endif
#include "core/hle/kernel/shared_memory.h"
#include "core/hle/service/service.h"
@ -217,9 +215,7 @@ public:
std::future<void> request_future;
std::atomic<u64> current_download_size_bytes;
std::atomic<u64> total_download_size_bytes;
#ifdef ENABLE_WEB_SERVICE
httplib::Response response;
#endif
};
struct SessionData : public Kernel::SessionRequestHandler::SessionDataBase {