acme: fix two flush bugs in new log file
TBR=rsc https://codereview.appspot.com/95010048
This commit is contained in:
parent
4a3fb87264
commit
45f8ba5414
1 changed files with 3 additions and 2 deletions
|
|
@ -100,7 +100,6 @@ xfidlogread(Xfid *x)
|
||||||
|
|
||||||
if(x->flushed) {
|
if(x->flushed) {
|
||||||
qunlock(&eventlog.lk);
|
qunlock(&eventlog.lk);
|
||||||
respond(x, &fc, "read cancelled");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -124,8 +123,10 @@ xfidlogflush(Xfid *x)
|
||||||
qlock(&eventlog.lk);
|
qlock(&eventlog.lk);
|
||||||
for(i=0; i<eventlog.nread; i++) {
|
for(i=0; i<eventlog.nread; i++) {
|
||||||
rx = eventlog.read[i];
|
rx = eventlog.read[i];
|
||||||
if(rx->fcall.tag == x->fcall.oldtag)
|
if(rx->fcall.tag == x->fcall.oldtag) {
|
||||||
rx->flushed = TRUE;
|
rx->flushed = TRUE;
|
||||||
|
rwakeupall(&eventlog.r);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
qunlock(&eventlog.lk);
|
qunlock(&eventlog.lk);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue