diff -r 43365a9b78a3 -r d8d70de2bd36 userlibandfileserver/fileserver/sfat32/fat_table32.cpp --- a/userlibandfileserver/fileserver/sfat32/fat_table32.cpp Tue Jul 06 15:50:07 2010 +0300 +++ b/userlibandfileserver/fileserver/sfat32/fat_table32.cpp Wed Aug 18 11:08:29 2010 +0300 @@ -692,7 +692,7 @@ CAtaFatTable::CAtaFatTable(CFatMountCB& aOwner) :CFatTable(aOwner), iDriveInteface(aOwner.DriveInterface()) { - iState = ENotInitialised; + iState = ENotInitialised; } @@ -1044,10 +1044,16 @@ //-- create helper thread object and start the thread ipHelperThread = CFat32BitCachePopulator::NewL(*this); - ipHelperThread->Launch(); - //-- background FAT bit cache populating thread is running now. - //-- the result of thread start up and completion isn't very interesting: If it fails to - //-- properly populate the cache, nothing fatal will happen. + if(ipHelperThread->Launch() != KErrNone) + {//-- failed for some reason + DestroyHelperThread(); + } + else + { + //-- background FAT bit cache populating thread is running now. + //-- the result of thread start up and completion isn't very interesting: If it fails to + //-- properly populate the cache, nothing fatal will happen. + } } //-- CFat32BitCachePopulator doesn't affect FAT table state. @@ -1544,7 +1550,8 @@ SetState(EFreeClustersScan); - ipHelperThread->Launch(); + User::LeaveIfError(ipHelperThread->Launch()); + //-- background FAT scanning thread is running now } @@ -1964,8 +1971,8 @@ return nRes; } - //-- Helper FAT thread is running now - return KErrNone; + //-- Helper FAT thread is running now + return KErrNone; } @@ -1983,7 +1990,8 @@ /** Launches the FAT32_ScanThread scaner thread. - @return standard error code + @return KErrNone if the thread launched OK + standard error code otherwise */ TInt CFat32ScanThread::Launch() {