diff options
Diffstat (limited to 'minion/src/wifi_module.cpp')
-rw-r--r-- | minion/src/wifi_module.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/minion/src/wifi_module.cpp b/minion/src/wifi_module.cpp index 2f4e57c..dbcd737 100644 --- a/minion/src/wifi_module.cpp +++ b/minion/src/wifi_module.cpp @@ -228,13 +228,13 @@ auto WiFiModule::get_local_ip(char *local_ip_out) noexcept -> const char * return local_ip_out; } -auto WiFiModule::read_incoming_request() noexcept -> HTTPRequest * +auto WiFiModule::read_incoming_request() noexcept -> HTTPRequest { char request_prefix[] = "+IPD,"; if (get_available() == 0 || !_serial.find(request_prefix)) { - return nullptr; + return HTTPRequest::create_invalid(); } const auto min_available_bytes = 5; @@ -273,15 +273,15 @@ auto WiFiModule::read_incoming_request() noexcept -> HTTPRequest * if (request_data == nullptr) { - return nullptr; + return HTTPRequest::create_invalid(); } strcpy(request_data, ""); _read_bytes(request_data, request_data_length, TIMEOUT_LONG); - return new HTTPRequest( - connection_id, + return HTTPRequest( + static_cast<int>(connection_id), request_method, http_version, request_path, |