Change HTTPCallback::OnReceiveData to use UniqueBuffer

See: https://github.com/OpenTTD/OpenTTD/issues/11636
This commit is contained in:
Jonathan G Rennison
2023-12-30 19:51:58 +00:00
parent f457f306ce
commit f8085683fb
8 changed files with 23 additions and 37 deletions

View File

@@ -389,12 +389,10 @@ void NetworkSurveyHandler::OnFailure()
this->loaded.notify_all();
}
void NetworkSurveyHandler::OnReceiveData(const char *data, size_t)
void NetworkSurveyHandler::OnReceiveData(UniqueBuffer<char> data)
{
if (data == nullptr) {
Debug(net, 1, "Survey: survey results sent");
this->loaded.notify_all();
} else {
free(data);
}
}