diff --git a/sys/src/cmd/auth/factotum/confirm.c b/sys/src/cmd/auth/factotum/confirm.c index 63086d0f2..805f728bf 100644 --- a/sys/src/cmd/auth/factotum/confirm.c +++ b/sys/src/cmd/auth/factotum/confirm.c @@ -21,8 +21,9 @@ confirmflush(Req *r) *l = r->aux; if(r->aux == nil) cuselast = l; - closereq(r); - break; + r->aux = nil; + respond(r, "interrupted"); + return; } } logbufflush(&confbuf, r); @@ -81,6 +82,7 @@ confirmwrite(char *s) *l = r->aux; if(r->aux == nil) cuselast = l; + r->aux = nil; break; } } @@ -143,8 +145,9 @@ needkeyflush(Req *r) *l = r->aux; if(r->aux == nil) needlast = l; - closereq(r); - break; + r->aux = nil; + respond(r, "interrupted"); + return; } } logbufflush(&needkeybuf, r); @@ -175,6 +178,7 @@ needkeywrite(char *s) *l = r->aux; if(r->aux == nil) needlast = l; + r->aux = nil; break; } } diff --git a/sys/src/cmd/auth/factotum/log.c b/sys/src/cmd/auth/factotum/log.c index 82ed6adf9..26c3cfc5f 100644 --- a/sys/src/cmd/auth/factotum/log.c +++ b/sys/src/cmd/auth/factotum/log.c @@ -59,9 +59,9 @@ logbufflush(Logbuf *lb, Req *r) for(l=&lb->wait; *l; l=&(*l)->aux){ if(*l == r){ *l = r->aux; - r->aux = nil; if(*l == nil) lb->waitlast = l; + r->aux = nil; respond(r, "interrupted"); break; }