Commit d80dc316 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 0b9cfeb2
...@@ -181,7 +181,7 @@ error _WatchLink::_serveRX(context::Context ctx) { ...@@ -181,7 +181,7 @@ error _WatchLink::_serveRX(context::Context ctx) {
// wcfs sent reply on unexpected stream -> shutdown wlink. // wcfs sent reply on unexpected stream -> shutdown wlink.
// XXX down. // XXX down.
log::Errorf("%s: .%lu: wcfs sent reply on unexpected stream", v(wlink), pkt.stream); log::Errorf("%s: .%lu: wcfs sent reply on unexpected stream", v(wlink), pkt.stream);
return XXX; return ErrLinkDown; // XXX correct error
} }
int _ = select({ int _ = select({
ctx->done().recvs(), // 0 ctx->done().recvs(), // 0
...@@ -197,9 +197,9 @@ error _WatchLink::_serveRX(context::Context ctx) { ...@@ -197,9 +197,9 @@ error _WatchLink::_serveRX(context::Context ctx) {
wlink._rxmu.lock(); wlink._rxmu.lock();
if (wlink._accepted.has(pkt.stream)) { if (wlink._accepted.has(pkt.stream)) {
wlink._rxmu.unlock(); wlink._rxmu.unlock();
// XXX log + down // wcfs request on already used stream
printf("%s: .%lu: wcfs sent request on already used stream", v(wlink), pkt.stream); log::Errorf("%s: .%lu: wcfs sent request on already used stream", v(wlink), pkt.stream);
continue; // XXX -> return return ErrLinkDown; // XXX correct error
} }
// 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._accepted.insert(pkt.stream);
......
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