acme: fix two flush bugs in new log file

TBR=rsc
https://codereview.appspot.com/95010048
This commit is contained in:
Russ Cox 2014-05-05 22:28:03 -04:00
parent 4a3fb87264
commit 45f8ba5414

View file

@ -100,7 +100,6 @@ xfidlogread(Xfid *x)
if(x->flushed) {
qunlock(&eventlog.lk);
respond(x, &fc, "read cancelled");
return;
}
@ -124,8 +123,10 @@ xfidlogflush(Xfid *x)
qlock(&eventlog.lk);
for(i=0; i<eventlog.nread; i++) {
rx = eventlog.read[i];
if(rx->fcall.tag == x->fcall.oldtag)
if(rx->fcall.tag == x->fcall.oldtag) {
rx->flushed = TRUE;
rwakeupall(&eventlog.r);
}
}
qunlock(&eventlog.lk);
}