[Yunq] Delete client capability in destructor.

Add a method to the server class to create an unowned capability. This
makes it simpler to create a capability for passing to other processes.

Duplicate the init yellowstone cap when using it temporarily.
This commit is contained in:
Drew Galbraith 2023-11-27 08:28:58 -08:00
parent 96a2f74e14
commit ad7794c694
24 changed files with 98 additions and 9 deletions

View file

@ -87,7 +87,9 @@ glcr::ErrorCode YellowstoneServer::HandleRegisterEndpoint(
dbgln("Registering {}.", req.endpoint_name().view());
check(endpoint_map_.Insert(req.endpoint_name(), req.endpoint_capability()));
if (req.endpoint_name() == "denali") {
auto part_info_or = HandleDenaliRegistration(req.endpoint_capability());
z_cap_t dup_cap;
check(ZCapDuplicate(req.endpoint_capability(), kZionPerm_All, &dup_cap));
auto part_info_or = HandleDenaliRegistration(dup_cap);
if (!part_info_or.ok()) {
check(part_info_or.error());
}