userlibandfileserver/fileserver/sfat32/sl_drv.cpp
branchRCL_3
changeset 44 3e88ff8f41d5
parent 43 c1f20ce4abcf
equal deleted inserted replaced
43:c1f20ce4abcf 44:3e88ff8f41d5
    44 
    44 
    45 /**
    45 /**
    46     Close the interface to the media driver
    46     Close the interface to the media driver
    47 */
    47 */
    48 void TDriveInterface::Close()
    48 void TDriveInterface::Close()
    49 {	 
    49 {
    50 	 if((iMount != NULL) && (iMount->LocalDrive() != NULL))
    50 	 if((iMount != NULL) && (iMount->LocalDrive() != NULL))
    51 		{
    51 		{
    52 		ASSERT(iMount->LocalDrive()->Mount() == NULL || iMount->LocalDrive()->Mount() == iMount);
    52 		ASSERT(iMount->LocalDrive()->Mount() == NULL || iMount->LocalDrive()->Mount() == iMount);
    53 		iMount->LocalDrive()->SetMount(NULL);
    53 		iMount->LocalDrive()->SetMount(NULL);
    54 		}
    54         }
       
    55 
    55      iMount = NULL;
    56      iMount = NULL;
    56 }
    57 }
    57 
    58 
    58 //---------------------------------------------------------------------------------------------------------------------------------------
    59 //---------------------------------------------------------------------------------------------------------------------------------------
    59 
    60 
   548     EnterCriticalSection();
   549     EnterCriticalSection();
   549     TInt nRes = iLocalDrive->Read(aPos, aLength, aTrg, aMessage.Handle(), anOffset, aFlag);
   550     TInt nRes = iLocalDrive->Read(aPos, aLength, aTrg, aMessage.Handle(), anOffset, aFlag);
   550     LeaveCriticalSection();
   551     LeaveCriticalSection();
   551     return nRes;
   552     return nRes;
   552 }
   553 }
   553        
   554 
   554 TInt TDriveInterface::XProxyDriveWrapper::Read(TInt64 aPos,TInt aLength,TDes8& aTrg) const
   555 TInt TDriveInterface::XProxyDriveWrapper::Read(TInt64 aPos,TInt aLength,TDes8& aTrg) const
   555 {
   556 {
   556     EnterCriticalSection();
   557     EnterCriticalSection();
   557     TInt nRes = iLocalDrive->Read(aPos, aLength, aTrg);
   558     TInt nRes = iLocalDrive->Read(aPos, aLength, aTrg);
   558     LeaveCriticalSection();
   559     LeaveCriticalSection();