flushhostcps-20030407
authorDerrick Brashear <shadow@dementia.org>
Mon, 7 Apr 2003 18:38:56 +0000 (18:38 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 7 Apr 2003 18:38:56 +0000 (18:38 +0000)
make it so flushhostcps can't try to Release when no host was found,
which was apparently the problem dlc@cs really observed.

src/viced/host.c

index 8904910..fdcb6dc 100644 (file)
@@ -504,10 +504,10 @@ void h_flushhostcps(register afs_uint32 hostaddr, register afs_uint32 hport)
     H_LOCK
     host = h_Lookup_r(hostaddr, hport, &held);
     if (host) {
-      host->hcpsfailed = 1;
+       host->hcpsfailed = 1;
+       if (!held)
+           h_Release_r(host);
     }
-    if (!held)
-      h_Release_r(host);
     H_UNLOCK
 
     return;