From: Jeffrey Altman Date: Mon, 4 Mar 2013 03:54:53 +0000 (-0500) Subject: Windows: AFSPopulateNameArrayFromRelatedArray change X-Git-Tag: upstream/1.8.0_pre1^2~1361 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=a3a79c5a15bff7e978ff4bae2d2a480b73750392;p=packages%2Fo%2Fopenafs.git 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 --- 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