commit 80097b018284589b1a3dd8d59549bbf7d3c67e8b
parent 257d7b48a653c7aac41a38b28f6c8c2e39241c92
Author: rsc <devnull@localhost>
Date: Fri, 18 Mar 2005 23:16:34 +0000
fix race
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/cmd/auth/factotum/fs.c b/src/cmd/auth/factotum/fs.c
@@ -231,9 +231,9 @@ fskickreply(Conv *c)
Req *r;
if(c->hangup){
- if(c->req){
- respond(c->req, "hangup");
+ if((r = c->req) != nil){
c->req = nil;
+ respond(r, "hangup");
}
return;
}
@@ -246,8 +246,8 @@ fskickreply(Conv *c)
r->ofcall.data = c->reply;
if(r->ofcall.count > r->ifcall.count)
r->ofcall.count = r->ifcall.count;
- respond(r, nil);
c->req = nil;
+ respond(r, nil);
c->nreply = 0;
}