Commit 2a4ad58d authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent e0f03507
......@@ -153,12 +153,14 @@ error _WatchLink::_serveRX(context::Context ctx) {
//printf("pkt.datalen: %u\n", pkt.datalen);
if (pkt.stream == 0) { // control/fatal message from wcfs
log::Warnf("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());
continue;
}
bool reply = (pkt.stream % 2 != 0);
// wcfs replies to our request
if (reply) {
chan<rxPkt> rxq;
bool ok;
......@@ -168,9 +170,9 @@ error _WatchLink::_serveRX(context::Context ctx) {
wlink._rxmu.unlock();
if (!ok) {
// wcfs sent reply on unexpected stream
// XXX log + down.
printf("wcfs sent reply on unexpected stream\n");
continue;
// XXX down.
log::Errorf("%s: wcfs sent reply on unexpected stream %lu", v(wlink), pkt.stream);
continue; // XXX -> down
}
int _ = select({
ctx->done().recvs(), // 0
......@@ -180,6 +182,8 @@ error _WatchLink::_serveRX(context::Context ctx) {
if (_ == 0)
return E(ctx->err());
}
// wcfs originated request
else {
wlink._rxmu.lock();
if (wlink._accepted.has(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