From 825e7d57e7b818aea1904de0ab200de422b45f69 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Sat, 15 Feb 2003 06:03:25 +0000 Subject: [PATCH] viced-client-set-refcount-before-chaining-into-host-20030215 didn't find a race but it's safer this way if there's one i missed --- src/viced/host.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/viced/host.c b/src/viced/host.c index b349a2d90..89cde4fa7 100644 --- a/src/viced/host.c +++ b/src/viced/host.c @@ -495,8 +495,8 @@ h_gethostcps_r(register struct host *host, register afs_int32 now) } } -void h_flushhostcps(hostaddr, hport) - register afs_uint32 hostaddr, hport; /* net byte order */ +/* args in net byte order */ +void h_flushhostcps(register afs_uint32 hostaddr, register afs_uint32 hport) { register struct host *host; int held; @@ -510,7 +510,7 @@ void h_flushhostcps(hostaddr, hport) h_Release_r(host); H_UNLOCK -return; + return; } @@ -1369,6 +1369,7 @@ ticket name length != 64 if (!client) { client = GetCE(); ObtainWriteLock(&client->lock); + client->refCount = 1; client->host = host; client->next = host->FirstClient; host->FirstClient = client; @@ -1382,7 +1383,6 @@ ticket name length != 64 client->VenusEpoch = rxr_GetEpoch(tcon); client->CPS.prlist_val = 0; client->CPS.prlist_len = 0; - client->refCount = 1; CurrentConnections++; /* increment number of connections */ } } -- 2.39.5