Commit 68871b72 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent a631c5ab
...@@ -168,8 +168,8 @@ error _WatchLink::_serveRX(context::Context ctx) { ...@@ -168,8 +168,8 @@ error _WatchLink::_serveRX(context::Context ctx) {
if (pkt.stream == 0) { // control/fatal message from wcfs if (pkt.stream == 0) { // control/fatal message from wcfs
log::Errorf("C: watch : rx fatal: %s\n", v(l)); log::Errorf("C: watch : rx fatal: %s\n", v(l));
wlink.fatalv.push_back(pkt.to_string()); wlink.fatalv.push_back(pkt.to_string()); // XXX stub -> errorq?
return E(ErrLinkDown); // XXX correct error continue; // wcfs should close link after error
} }
bool reply = (pkt.stream % 2 != 0); bool reply = (pkt.stream % 2 != 0);
...@@ -184,9 +184,8 @@ error _WatchLink::_serveRX(context::Context ctx) { ...@@ -184,9 +184,8 @@ error _WatchLink::_serveRX(context::Context ctx) {
wlink._rxmu.unlock(); wlink._rxmu.unlock();
if (!ok) { if (!ok) {
// wcfs sent reply on unexpected stream -> shutdown wlink. // wcfs sent reply on unexpected stream -> shutdown wlink.
// 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 ErrLinkDown; // XXX correct error return E(ErrLinkDown);
} }
int _ = select({ int _ = select({
ctx->done().recvs(), // 0 ctx->done().recvs(), // 0
...@@ -203,7 +202,7 @@ error _WatchLink::_serveRX(context::Context ctx) { ...@@ -203,7 +202,7 @@ error _WatchLink::_serveRX(context::Context ctx) {
wlink._rxmu.unlock(); wlink._rxmu.unlock();
// wcfs request on already used stream // wcfs request on already used stream
log::Errorf("%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);
return ErrLinkDown; // XXX correct error return E(ErrLinkDown);
} }
wlink._accepted.insert(pkt.stream); wlink._accepted.insert(pkt.stream);
wlink._rxmu.unlock(); wlink._rxmu.unlock();
......
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