factotum: fix flush handling for /mnt/factotum/needkey use
This commit is contained in:
parent
bb3a16f07f
commit
b8d741d34b
2 changed files with 9 additions and 5 deletions
|
@ -21,8 +21,9 @@ confirmflush(Req *r)
|
||||||
*l = r->aux;
|
*l = r->aux;
|
||||||
if(r->aux == nil)
|
if(r->aux == nil)
|
||||||
cuselast = l;
|
cuselast = l;
|
||||||
closereq(r);
|
r->aux = nil;
|
||||||
break;
|
respond(r, "interrupted");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
logbufflush(&confbuf, r);
|
logbufflush(&confbuf, r);
|
||||||
|
@ -81,6 +82,7 @@ confirmwrite(char *s)
|
||||||
*l = r->aux;
|
*l = r->aux;
|
||||||
if(r->aux == nil)
|
if(r->aux == nil)
|
||||||
cuselast = l;
|
cuselast = l;
|
||||||
|
r->aux = nil;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -143,8 +145,9 @@ needkeyflush(Req *r)
|
||||||
*l = r->aux;
|
*l = r->aux;
|
||||||
if(r->aux == nil)
|
if(r->aux == nil)
|
||||||
needlast = l;
|
needlast = l;
|
||||||
closereq(r);
|
r->aux = nil;
|
||||||
break;
|
respond(r, "interrupted");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
logbufflush(&needkeybuf, r);
|
logbufflush(&needkeybuf, r);
|
||||||
|
@ -175,6 +178,7 @@ needkeywrite(char *s)
|
||||||
*l = r->aux;
|
*l = r->aux;
|
||||||
if(r->aux == nil)
|
if(r->aux == nil)
|
||||||
needlast = l;
|
needlast = l;
|
||||||
|
r->aux = nil;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,9 +59,9 @@ logbufflush(Logbuf *lb, Req *r)
|
||||||
for(l=&lb->wait; *l; l=&(*l)->aux){
|
for(l=&lb->wait; *l; l=&(*l)->aux){
|
||||||
if(*l == r){
|
if(*l == r){
|
||||||
*l = r->aux;
|
*l = r->aux;
|
||||||
r->aux = nil;
|
|
||||||
if(*l == nil)
|
if(*l == nil)
|
||||||
lb->waitlast = l;
|
lb->waitlast = l;
|
||||||
|
r->aux = nil;
|
||||||
respond(r, "interrupted");
|
respond(r, "interrupted");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue