userlibandfileserver/fileserver/sfile/sf_request.cpp
branchRCL_3
changeset 42 a179b74831c9
parent 21 e7d2d738d3c2
child 43 c1f20ce4abcf
equal deleted inserted replaced
41:0ffb4e86fcc9 42:a179b74831c9
  1114 		Complete(err);
  1114 		Complete(err);
  1115 		return;
  1115 		return;
  1116 		}
  1116 		}
  1117 
  1117 
  1118 	SetError(err);
  1118 	SetError(err);
  1119 
  1119 	
       
  1120     if (IsExpectedResult(err) && !IsPluginSpecific() && !IsNotifierSpecific())
       
  1121         DoNotifyDiskSpace(KErrNone);
  1120 
  1122 
  1121 	// Start issuing the post-operation requests starting from the bottom of the chain
  1123 	// Start issuing the post-operation requests starting from the bottom of the chain
  1122 	iCurrentPlugin = NULL;
  1124 	iCurrentPlugin = NULL;
  1123 	if (PostInterceptEnabled())
  1125 	if (PostInterceptEnabled())
  1124 		{
  1126 		{
  1140 //
  1142 //
  1141 //
  1143 //
  1142 	{
  1144 	{
  1143 	__THRD_PRINT2(_L("----- CFsMessageRequest::Complete() req %08x with %d"), this, aError);
  1145 	__THRD_PRINT2(_L("----- CFsMessageRequest::Complete() req %08x with %d"), this, aError);
  1144 
  1146 
  1145 	if (aError==KErrNoMemory)
       
  1146 		{
       
  1147 		if (iDrive)	// Not all message requests are associated with a drive!
       
  1148 			{
       
  1149 			TDriveInfo di;
       
  1150 			iDrive->DriveInfo(di);
       
  1151 			if (di.iType == EMediaRam)
       
  1152 				aError = KErrNoMemory;
       
  1153 			}
       
  1154 		}
       
  1155 	if(aError!=KErrNone)
  1147 	if(aError!=KErrNone)
  1156 		{
  1148 		{
  1157 		if(iOperation->IsOpenSubSess())
  1149 		if(iOperation->IsOpenSubSess())
  1158 			RequestAllocator::OpenSubFailed(Session());
  1150 			RequestAllocator::OpenSubFailed(Session());
  1159 		}
  1151 		}
  1296 	TInt driveNumber = DriveNumber();
  1288 	TInt driveNumber = DriveNumber();
  1297 
  1289 
  1298 	if(aError==KErrNone)
  1290 	if(aError==KErrNone)
  1299 		{
  1291 		{
  1300 		if(!(FsNotify::IsChangeQueEmpty(driveNumber)))
  1292 		if(!(FsNotify::IsChangeQueEmpty(driveNumber)))
  1301 			FsNotify::HandleChange(this,driveNumber);	
  1293 			FsNotify::HandleChange(this,driveNumber);
  1302 		if ((driveNumber != KDriveInvalid) && !(FsNotify::IsDiskSpaceQueEmpty(driveNumber)))
       
  1303 			FsNotify::HandleDiskSpace(this, DriveNumber());
       
  1304 	
  1294 	
  1305 #ifdef SYMBIAN_F32_ENHANCED_CHANGE_NOTIFICATION
  1295 #ifdef SYMBIAN_F32_ENHANCED_CHANGE_NOTIFICATION
  1306 		if 	(iOperation->iFunction == EFsFileWrite)
  1296 		if 	(iOperation->iFunction == EFsFileWrite)
  1307 			{
  1297 			{
  1308 			CFileShare* share = (CFileShare*) this->ScratchValue();
  1298 			CFileShare* share = (CFileShare*) this->ScratchValue();
  1335 			}
  1325 			}
  1336 #endif //SYMBIAN_F32_ENHANCED_CHANGE_NOTIFICATION
  1326 #endif //SYMBIAN_F32_ENHANCED_CHANGE_NOTIFICATION
  1337 		}
  1327 		}
  1338 	}
  1328 	}
  1339 
  1329 
       
  1330 void CFsMessageRequest::DoNotifyDiskSpace(TInt aError)
       
  1331     {
       
  1332     __PRINT1(_L("----- CFsMessageRequest::DoNotifyDiskSpace() with %d"),aError);
       
  1333     if(aError != KErrNone)
       
  1334         return;
       
  1335 
       
  1336     TInt driveNumber = DriveNumber();
       
  1337     if ((driveNumber != KDriveInvalid) && !(FsNotify::IsDiskSpaceQueEmpty(driveNumber)))
       
  1338         FsNotify::HandleDiskSpace(this, driveNumber);
       
  1339     }
  1340 
  1340 
  1341 void CFsMessageRequest::Free()
  1341 void CFsMessageRequest::Free()
  1342 //
  1342 //
  1343 //
  1343 //
  1344 //
  1344 //