[Denali] Create unowned cap to pass to yellowstone.

This commit is contained in:
Drew Galbraith 2023-11-27 08:34:37 -08:00
parent 1614f2ae53
commit 17b22c913b
1 changed files with 2 additions and 3 deletions

View File

@ -20,13 +20,12 @@ uint64_t main(uint64_t init_port_cap) {
ASSIGN_OR_RETURN(glcr::UniquePtr<DenaliServer> server,
DenaliServer::Create(*driver));
ASSIGN_OR_RETURN(DenaliClient client, server->CreateClient());
Thread server_thread = server->RunServer();
RegisterEndpointRequest req;
req.set_endpoint_name("denali");
req.set_endpoint_capability(client.Capability());
ASSIGN_OR_RETURN(z_cap_t client_cap, server->CreateClientCap());
req.set_endpoint_capability(client_cap);
check(stub.RegisterEndpoint(req));
check(server_thread.Join());