Skip to content

Commit

Permalink
Merge pull request #451 from zenhack/use-vine
Browse files Browse the repository at this point in the history
recvCap: use the vine for thirdPartyHosted caps.
  • Loading branch information
lthibault authored Feb 14, 2023
2 parents 1613bb0 + 88953d5 commit f07bb8d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions rpc/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -1305,6 +1305,18 @@ func (c *lockedConn) recvCap(d rpccp.CapDescriptor) (capnp.Client, error) {
// > rather than being delivered locally.
id := importID(d.SenderPromise())
return c.addImport(id), nil
case rpccp.CapDescriptor_Which_thirdPartyHosted:
// We don't support third-party handoff yet, so instead of trying to
// pick this up, use the vine and treat it the same as senderHosted:
thirdPartyDesc, err := d.ThirdPartyHosted()
if err != nil {
return capnp.Client{}, exc.WrapError(
"reading ThridPartyCapDescriptor",
err,
)
}
id := importID(thirdPartyDesc.VineId())
return c.addImport(id), nil
case rpccp.CapDescriptor_Which_receiverHosted:
id := exportID(d.ReceiverHosted())
ent := c.findExport(id)
Expand Down

0 comments on commit f07bb8d

Please sign in to comment.