[mammoth] Move EndpointClient to move-only semantics.

This commit is contained in:
Drew Galbraith 2023-06-26 11:54:36 -07:00
parent 2e89aee5a3
commit 90f33f31c5
15 changed files with 44 additions and 30 deletions

View file

@ -21,9 +21,8 @@ void RegistrationThreadBootstrap(void* yellowstone) {
}
glcr::ErrorCode HandleDenaliRegistration(z_cap_t endpoint_cap) {
EndpointClient endpoint = EndpointClient::AdoptEndpoint(endpoint_cap);
DenaliClient client(endpoint);
GptReader reader(client);
GptReader reader(glcr::UniquePtr<DenaliClient>(
new DenaliClient(EndpointClient::AdoptEndpoint(endpoint_cap))));
return reader.ParsePartitionTables();
}
@ -103,6 +102,7 @@ void YellowstoneServer::RegistrationThread() {
}
}
glcr::ErrorOr<EndpointClient> YellowstoneServer::GetServerClient() {
glcr::ErrorOr<glcr::UniquePtr<EndpointClient>>
YellowstoneServer::GetServerClient() {
return server_->CreateClient();
}