Windows: Properly convert FID structures
authorJeffrey Altman <jaltman@your-file-system.com>
Fri, 16 Dec 2011 21:15:56 +0000 (16:15 -0500)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 17 Dec 2011 05:21:57 +0000 (21:21 -0800)
Use the FID conversion function in RDR_SetFileStatus().
The FID structures are not the same in afsd_service and the
afsredirlib.sys driver.

Change-Id: I6360f39c8b90c46d468a06c08f0911f55f9142fb
Reviewed-on: http://gerrit.openafs.org/6350
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>

src/WINNT/afsrdr/user/RDRInit.cpp

index 37a30d8..371f465 100644 (file)
@@ -1520,15 +1520,14 @@ RDR_SetFileStatus( cm_fid_t *fidp,
     AFSExtentFailureCB  SetFileStatusCB;
     DWORD               bytesReturned;
     DWORD               gle;
-    AFSFileID          *pFileId = (AFSFileID *)fidp;
 
-    SetFileStatusCB.FileId = *pFileId;
+    RDR_fid2FID(fidp, &SetFileStatusCB.FileId);
     SetFileStatusCB.FailureStatus = dwStatus;
 
     if (afsd_logp->enabled) {
         swprintf( wchBuffer, L"RDR_SetFileStatus IOCTL_AFS_EXTENT_FAILURE_CB Fid %08lX.%08lX.%08lX.%08lX Status 0x%lX",
-                  pFileId->Cell, pFileId->Volume,
-                  pFileId->Vnode, pFileId->Unique,
+                  SetFileStatusCB.FileId.Cell, SetFileStatusCB.FileId.Volume,
+                  SetFileStatusCB.FileId.Vnode, SetFileStatusCB.FileId.Unique,
                   dwStatus);
 
         osi_Log1(afsd_logp, "%S", osi_LogSaveStringW(afsd_logp, wchBuffer));