[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:
parent
96a2f74e14
commit
ad7794c694
24 changed files with 98 additions and 9 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#include <glacier/string/str_split.h>
|
||||
#include <victoriafalls/victoriafalls.yunq.client.h>
|
||||
#include <yellowstone/yellowstone.yunq.client.h>
|
||||
#include <zcall.h>
|
||||
#include <zglobal.h>
|
||||
|
||||
#include "util/debug.h"
|
||||
|
|
@ -14,7 +15,11 @@ VFSClient* gVfsClient = nullptr;
|
|||
|
||||
void GetVfsClientIfNeeded() {
|
||||
if (gVfsClient == nullptr) {
|
||||
YellowstoneClient client(gInitEndpointCap);
|
||||
// TODO: Add an unowned client so we don't have to duplicate this cap every
|
||||
// time.
|
||||
uint64_t dup_cap;
|
||||
check(ZCapDuplicate(gInitEndpointCap, kZionPerm_All, &dup_cap));
|
||||
YellowstoneClient client(dup_cap);
|
||||
|
||||
GetEndpointRequest yreq;
|
||||
yreq.set_endpoint_name("victoriafalls");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue