commit 9dab36f2af60901565b97c8ca0ece46f70fa3ead
parent c57b71966ec2b3342a3a4da515944cabf268609f
Author: Tw <wei.tan@intel.com>
Date: Mon, 12 Jul 2021 11:21:00 +0800
factotum: fix log read inuse bug
When log reading exits, inuse flag should be cleared.
Signed-off-by: Tw <wei.tan@intel.com>
Diffstat:
3 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/cmd/auth/factotum/dat.h b/src/cmd/auth/factotum/dat.h
@@ -111,6 +111,7 @@ extern char *owner; /* main.c */
extern Proto *prototab[]; /* main.c */
extern Ring ring; /* key.c */
extern char *rpcname[]; /* rpc.c */
+extern int *loginuse; /* fs.c */
extern char Easproto[]; /* err.c */
diff --git a/src/cmd/auth/factotum/fs.c b/src/cmd/auth/factotum/fs.c
@@ -260,6 +260,7 @@ fskickreply(Conv *c)
static int inuse[nelem(dirtab)];
int *confirminuse = &inuse[0];
int *needkeyinuse = &inuse[1];
+int *loginuse = &inuse[5];
static void
fsopen(Req *r)
{
diff --git a/src/cmd/auth/factotum/log.c b/src/cmd/auth/factotum/log.c
@@ -107,6 +107,7 @@ void
logflush(Req *r)
{
lbflush(&logbuf, r);
+ *loginuse = 0;
}
void