From 4edc9a24b4b742c5945c8d931afb00bc87f30689 Mon Sep 17 00:00:00 2001 From: Craig Edwards Date: Wed, 4 Dec 2024 17:58:29 +0000 Subject: [PATCH] fix: apple weirdness --- src/dpp/httpsclient.cpp | 2 +- src/dpp/queues.cpp | 5 +++-- src/dpp/socketengines/kqueue.cpp | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/dpp/httpsclient.cpp b/src/dpp/httpsclient.cpp index a16cbdf1a6..7ab9f5fdac 100644 --- a/src/dpp/httpsclient.cpp +++ b/src/dpp/httpsclient.cpp @@ -349,7 +349,7 @@ void https_client::close() { https_client::~https_client() { if (sfd != INVALID_SOCKET) { - https_client::close(); + ssl_client::close(); } } diff --git a/src/dpp/queues.cpp b/src/dpp/queues.cpp index a92e230d4f..b4d737082b 100644 --- a/src/dpp/queues.cpp +++ b/src/dpp/queues.cpp @@ -239,7 +239,7 @@ http_request_completion_t http_request::run(request_concurrency_queue* processor if (client->timed_out) { result.error = h_connection; owner->log(ll_error, "HTTP(S) error on " + hci.scheme + " connection to " + request_verb[method] + " " + hci.hostname + ":" + std::to_string(hci.port) + _url + ": Timed out while waiting for the response"); - } else if (cli->get_status() < 100) { + } else if (client->get_status() < 100) { result.error = h_connection; owner->log(ll_error, "HTTP(S) error on " + hci.scheme + " connection to " + request_verb[method] + " " + hci.hostname + ":" + std::to_string(hci.port) + _url + ": Malformed HTTP response"); } @@ -403,7 +403,8 @@ void request_concurrency_queue::tick_and_deliver_requests(uint32_t index) for (auto it = begin; it != end; ++it) { if (it->get() == request_view) { /* Grab and remove */ - removals.emplace_back(std::move(*it)); + rq = std::move(*it); + removals.push_back(std::move(rq)); requests_in.erase(it); break; } diff --git a/src/dpp/socketengines/kqueue.cpp b/src/dpp/socketengines/kqueue.cpp index 9240d2e17b..4e81f0aab2 100644 --- a/src/dpp/socketengines/kqueue.cpp +++ b/src/dpp/socketengines/kqueue.cpp @@ -148,7 +148,7 @@ struct DPP_EXPORT socket_engine_kqueue : public socket_engine_base { bool remove_socket(dpp::socket fd) final { bool r = socket_engine_base::remove_socket(fd); if (r) { - struct kevent ke; + struct kevent ke{}; EV_SET(&ke, fd, EVFILT_WRITE, EV_DELETE, 0, 0, nullptr); kevent(kqueue_handle, &ke, 1, nullptr, 0, nullptr); EV_SET(&ke, fd, EVFILT_READ, EV_DELETE, 0, 0, nullptr);