Commit 527e4904 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 3d12e2ca
......@@ -289,17 +289,18 @@ void Conn::_pinner(IContext *ctx) {
// XXX panic/exc -> log.CRITICAL
PinReq req;
error err;
while (1) {
// XXX -> recv inplace into on-stack req ?
// XXX -> err, handle EOF, abort on *
PinReq *req = wconn._wlink->recvReq(ctx);
if (req == NULL)
return // XXX ok? (EOF - when wcfs closes wlink)
err = wconn._wlink->recvReq(ctx, &req);
if (err != nil) {
// XXX -> err, handle EOF, abort on *
return; // XXX ok? (EOF - when wcfs closes wlink)
}
// we received request to pin/unpin file block. handle it
wconn._pin1(req);
// XXX free req?
wconn._pin1(&req);
}
}
......@@ -666,20 +667,21 @@ error WatchLink::recvReq(IContext *ctx, PinReq *rx) {
WatchLink& wlink = *this;
rxPkt pkt;
_ = select(
int _ = select({
ctx->done().recvs(), // 0
wlink._acceptq.recvs(&pkt), // 1
)
});
if (_ == 0)
return ctx.err();
return ctx->err();
rx = _rx
if rx is None: // XXX recheck _serveRX vs EOF signalling
return rx
rx.stream = pkt.stream;
pkt.to_sting();
pkt.to_string();
stream, msg = rx
// XXX -> _parsePinReq
return PinReq(wlink, stream, msg)
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment