From 06d247abbe742782c51697a8b74ba7c4e0d937cb Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Sat, 15 Nov 2008 17:07:53 +0000 Subject: [PATCH] DEVEL15-windows-btree-20081115 LICENSE MIT return an error if the enumeration of the directory cannot complete because the btree has not yet been generated. (cherry picked from commit ab37d70f502e3b5ebdbfe23107ac5006cc0e9a2f) --- src/WINNT/afsd/cm_btree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/WINNT/afsd/cm_btree.c b/src/WINNT/afsd/cm_btree.c index b67807b03..64286d4ca 100644 --- a/src/WINNT/afsd/cm_btree.c +++ b/src/WINNT/afsd/cm_btree.c @@ -2176,7 +2176,7 @@ cm_BPlusDirEnumerate(cm_scache_t *scp, afs_uint32 locked, afs_uint32 count = 0, slot, numentries; Nptr leafNode = NONODE, nextLeafNode; Nptr firstDataNode, dataNode, nextDataNode; - cm_direnum_t * enump; + cm_direnum_t * enump = NULL; long rc = 0; char buffer[512]; @@ -2188,6 +2188,7 @@ cm_BPlusDirEnumerate(cm_scache_t *scp, afs_uint32 locked, if (scp->dirBplus == NULL) { osi_Log0(afsd_logp, "cm_BPlusDirEnumerate No BPlus Tree"); + rc = CM_ERROR_WOULDBLOCK; goto done; } -- 2.39.5