Skip to content

Commit

Permalink
Remove unused *releaseList param from parseCall.
Browse files Browse the repository at this point in the history
  • Loading branch information
lthibault committed Apr 2, 2023
1 parent e2efc56 commit 91a389a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions rpc/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ func (c *Conn) handleCall(ctx context.Context, in transport.IncomingMessage) err
return
}

parseErr = c.parseCall(rl, &p, call) // parseCall sets CapTable
parseErr = c.parseCall(&p, call) // parseCall sets CapTable
})
if err != nil {
return err
Expand Down Expand Up @@ -1016,7 +1016,7 @@ type parsedMessageTarget struct {
transform []capnp.PipelineOp
}

func (c *lockedConn) parseCall(rl *releaseList, p *parsedCall, call rpccp.Call) error {
func (c *lockedConn) parseCall(p *parsedCall, call rpccp.Call) error {
p.method = capnp.Method{
InterfaceID: call.InterfaceId(),
MethodID: call.MethodId(),
Expand All @@ -1025,7 +1025,7 @@ func (c *lockedConn) parseCall(rl *releaseList, p *parsedCall, call rpccp.Call)
if err != nil {
return rpcerr.WrapFailed("read params", err)
}
ptr, _, err := c.recvPayload(rl, payload)
ptr, _, err := c.recvPayload(payload)
if err != nil {
return rpcerr.Annotate(err, "read params")
}
Expand Down Expand Up @@ -1146,7 +1146,7 @@ func (c *Conn) handleReturn(ctx context.Context, in transport.IncomingMessage) e
}
return nil
}
pr := c.parseReturn(rl, ret, q.called) // fills in CapTable
pr := c.parseReturn(ret, q.called) // fills in CapTable
if pr.parseFailed {
c.er.ReportError(rpcerr.Annotate(pr.err, "incoming return"))
}
Expand Down Expand Up @@ -1215,14 +1215,14 @@ func (c *Conn) handleReturn(ctx context.Context, in transport.IncomingMessage) e
})
}

func (c *lockedConn) parseReturn(rl *releaseList, ret rpccp.Return, called [][]capnp.PipelineOp) parsedReturn {
func (c *lockedConn) parseReturn(ret rpccp.Return, called [][]capnp.PipelineOp) parsedReturn {
switch w := ret.Which(); w {
case rpccp.Return_Which_results:
r, err := ret.Results()
if err != nil {
return parsedReturn{err: rpcerr.WrapFailed("parse return", err), parseFailed: true}
}
content, locals, err := c.recvPayload(rl, r)
content, locals, err := c.recvPayload(r)
if err != nil {
return parsedReturn{err: rpcerr.WrapFailed("parse return", err), parseFailed: true}
}
Expand Down Expand Up @@ -1493,7 +1493,7 @@ func (c *lockedConn) isLocalClient(client capnp.Client) bool {
// the capability table that represent capabilities in the local vat.
//
// The caller must be holding onto c.lk.
func (c *lockedConn) recvPayload(rl *releaseList, payload rpccp.Payload) (_ capnp.Ptr, locals uintSet, _ error) {
func (c *lockedConn) recvPayload(payload rpccp.Payload) (_ capnp.Ptr, locals uintSet, _ error) {
if !payload.IsValid() {
// null pointer; in this case we can treat the cap table as being empty
// and just return.
Expand Down

0 comments on commit 91a389a

Please sign in to comment.