From a3a79c5a15bff7e978ff4bae2d2a480b73750392 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Sun, 3 Mar 2013 22:54:53 -0500 Subject: [PATCH] Windows: AFSPopulateNameArrayFromRelatedArray change Modify AFSPopulateNameArrayFromRelatedArray so that the DirectoryCB parameter can safely be NULL. A NULL DirectoryCB input is required to copy the entire NameArray. Change-Id: Id125bb22df89c93e60d485e178bc7be0ab3c313e Reviewed-on: http://gerrit.openafs.org/9340 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- src/WINNT/afsrdr/kernel/lib/AFSGeneric.cpp | 37 +++++++++++++++------- 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/src/WINNT/afsrdr/kernel/lib/AFSGeneric.cpp b/src/WINNT/afsrdr/kernel/lib/AFSGeneric.cpp index 7c31ecf63..0620b6a4c 100644 --- a/src/WINNT/afsrdr/kernel/lib/AFSGeneric.cpp +++ b/src/WINNT/afsrdr/kernel/lib/AFSGeneric.cpp @@ -5238,18 +5238,31 @@ AFSPopulateNameArrayFromRelatedArray( IN AFSNameArrayHdr *NameArray, __Enter { - AFSDbgLogMsg( AFS_SUBSYSTEM_NAME_ARRAY_PROCESSING, - AFS_TRACE_LEVEL_VERBOSE, - "AFSPopulateNameArray [NA:%p] passed RelatedNameArray %p DE %p FID %08lX-%08lX-%08lX-%08lX %wZ Type %d\n", - NameArray, - RelatedNameArray, - DirectoryCB, - DirectoryCB->ObjectInformation->FileId.Cell, - DirectoryCB->ObjectInformation->FileId.Volume, - DirectoryCB->ObjectInformation->FileId.Vnode, - DirectoryCB->ObjectInformation->FileId.Unique, - &DirectoryCB->NameInformation.FileName, - DirectoryCB->ObjectInformation->FileType); + if ( DirectoryCB) + { + + AFSDbgLogMsg( AFS_SUBSYSTEM_NAME_ARRAY_PROCESSING, + AFS_TRACE_LEVEL_VERBOSE, + "AFSPopulateNameArray [NA:%p] passed RelatedNameArray %p DE %p FID %08lX-%08lX-%08lX-%08lX %wZ Type %d\n", + NameArray, + RelatedNameArray, + DirectoryCB, + DirectoryCB->ObjectInformation->FileId.Cell, + DirectoryCB->ObjectInformation->FileId.Volume, + DirectoryCB->ObjectInformation->FileId.Vnode, + DirectoryCB->ObjectInformation->FileId.Unique, + &DirectoryCB->NameInformation.FileName, + DirectoryCB->ObjectInformation->FileType); + } + else + { + + AFSDbgLogMsg( AFS_SUBSYSTEM_NAME_ARRAY_PROCESSING, + AFS_TRACE_LEVEL_VERBOSE, + "AFSPopulateNameArray [NA:%p] passed RelatedNameArray %p DE NULL\n", + NameArray, + RelatedNameArray); + } // // Init some info in the header -- 2.39.5