--- a/genericopenlibs/openenvcore/backend/src/corebackend/localif.cpp Tue Apr 27 18:23:16 2010 +0300
+++ b/genericopenlibs/openenvcore/backend/src/corebackend/localif.cpp Tue May 11 17:47:24 2010 +0300
@@ -183,7 +183,7 @@
User::Panic(KEstlibInit, err);
}
- iCleanup.StorePtrs(iPrivateHeap, &iFs, &iSs, &iCs, &iSSLock, &iCSLock, &iTzServer);
+ iCleanup.StorePtrs(iPrivateHeap, &iFs, &iSs, &iCs, &iSSLock, &iCSLock);
// No connection settings by default
iDefConnPref = NULL;
@@ -200,9 +200,12 @@
iASelectLock.Close();
// Close the default connection lock
iDefConnLock.Close();
+
//close the default RConnection
if(iDefConnection.SubSessionHandle() != 0)
+ {
iDefConnection.Close();
+ }
RHeap* oHeap = User::SwitchHeap(iPrivateHeap);
for (TInt i = 0, count = iTLDInfoList.Count(); i < count; i++ )
@@ -216,14 +219,12 @@
int err;
// passing 1 to cancelaselect will kill all the threads serving aselect
cancelaselect(NULL,err,1);
- // Switch to backend heap
- RHeap* oldHeap = User::SwitchHeap(iPrivateHeap);
+
// Close the array that maintains aselect request details
iASelectRequest.Close();
//close the RTz connection
iTzServer.Close();
- // Switch back to old heap
- User::SwitchHeap(oldHeap);
+
if( iDefConnPref )
{
@@ -231,20 +232,14 @@
{
case TConnPref::EConnPrefSnap:
{
- RHeap* oldHeap = User::SwitchHeap(iPrivateHeap);
delete (TCommSnapPref*)iDefConnPref;
- // Switch back to old heap
- User::SwitchHeap(oldHeap);
iDefConnPref = NULL;
}
break;
case TConnPref::EConnPrefCommDb:
{
- RHeap* oldHeap = User::SwitchHeap(iPrivateHeap);
delete (TCommDbConnPref*)iDefConnPref;
- // Switch back to old heap
- User::SwitchHeap(oldHeap);
iDefConnPref = NULL;
}
break;
@@ -257,11 +252,25 @@
}
#if (defined SYMBIAN_OE_POSIX_SIGNALS && defined SYMBIAN_OE_LIBRT)
- iTimerOverrunsMutex.Close();
+ iTimerOverrunsMutex.Close();
iTimerOverruns.Close();
#endif
+
+#if (defined SYMBIAN_OE_POSIX_SIGNALS)
+ iSigInitWaitMutex.Close();
+ iSigInitWaitSemaphore.Close();
+ iBlockedSAMutex.Close();
+ iSignalWaiterMutex.Close();
+ iSignalInitSemaphore.Close();
+#endif
//close the RpointerArray
iOpenDirList.Close();
+
+ iSSLock.Close();
+ iCSLock.Close();
+ iSignalSession.Close();
+ iIpcS.Close();
+
User::SwitchHeap(oHeap);
}
@@ -334,8 +343,8 @@
}
int CLocalSystemInterface::stat (const wchar_t* name, struct stat *st, int& anErrno)
- {
- const wchar_t* filename;
+ {
+ const wchar_t* filename = name;
// This needs to be zero terminated
TBuf<KMaxFileName> inputName;
TUint pathAtt = 0;
@@ -349,12 +358,6 @@
}
filename = (wchar_t*)inputName.PtrZ();
}
- // try to stat anyway
- else
- {
- inputName.Copy((const TText16*)name);
- filename = (wchar_t*)inputName.PtrZ();
- }
TSpecialFileType fileType;
struct SLinkInfo enBuf;
// Check the type of file