]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-h-enumerate-less-heavyhanded-check-20080201
authorDerrick Brashear <shadow@dementia.org>
Fri, 1 Feb 2008 21:33:40 +0000 (21:33 +0000)
committerDerrick Brashear <shadow@dementia.org>
Fri, 1 Feb 2008 21:33:40 +0000 (21:33 +0000)
LICENSE IPL10

if hostCount is too small this is fine or at least not fatal

(cherry picked from commit 4fe2978f69f6314284d5689ea1d9169360155450)

src/viced/host.c

index b28f55e31a13bb56a77c41082ae804dd73f921e4..54f49825004c6030e8649302f7cd439864041b7b 100644 (file)
@@ -1086,7 +1086,10 @@ h_Enumerate(int (*proc) (), char *param)
        if (!(held[count] = h_Held_r(host)))
            h_Hold_r(host);
     }
-    assert(count == hostCount);
+    if (count != hostCount) {
+       ViceLog(0, ("h_Enumerate found %d of %d hosts\n", count, hostCount));
+    }
+    assert(count <= hostCount);
     H_UNLOCK;
     for (i = 0; i < count; i++) {
        held[i] = (*proc) (list[i], held[i], param);