Commit 0b9cfeb2 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent cc6e57db
......@@ -164,7 +164,7 @@ error _WatchLink::_serveRX(context::Context ctx) {
if (pkt.stream == 0) { // control/fatal message from wcfs
log::Errorf("C: watch : rx fatal: %s\n", v(l));
wlink.fatalv.push_back(pkt.to_string());
continue;
continue; // XXX -> shutdown ?
}
bool reply = (pkt.stream % 2 != 0);
......@@ -178,10 +178,10 @@ error _WatchLink::_serveRX(context::Context ctx) {
tie(rxq, ok) = wlink._rxtab.pop_(pkt.stream);
wlink._rxmu.unlock();
if (!ok) {
// wcfs sent reply on unexpected stream
// wcfs sent reply on unexpected stream -> shutdown wlink.
// XXX down.
log::Errorf("%s: wcfs sent reply on unexpected stream %lu", v(wlink), pkt.stream);
continue; // XXX -> down
log::Errorf("%s: .%lu: wcfs sent reply on unexpected stream", v(wlink), pkt.stream);
return XXX;
}
int _ = select({
ctx->done().recvs(), // 0
......@@ -198,10 +198,10 @@ error _WatchLink::_serveRX(context::Context ctx) {
if (wlink._accepted.has(pkt.stream)) {
wlink._rxmu.unlock();
// XXX log + down
printf("wcfs sent request on already used stream\n");
continue;
printf("%s: .%lu: wcfs sent request on already used stream", v(wlink), pkt.stream);
continue; // XXX -> return
}
// XXX clear _accepted not to leak memory after reply is sent?
// XXX clear _accepted not to leak memory after reply is sent
wlink._accepted.insert(pkt.stream);
wlink._rxmu.unlock();
int _ = select({
......
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