201033_01
authorhgs
Wed, 18 Aug 2010 01:39:51 +0530
changeset 41 0abbef78e78b
parent 36 e7635922c074
child 42 089681919c6f
201033_01
messagingfw/biomsgfw/IACPSRC/wwwp.CPP
messagingfw/biomsgfw/wappsrc/wapp.cpp
messagingfw/msgsrvnstore/server/group/messageserver.iby
messagingfw/msgsrvnstore/server/src/CMsvAttachmentManager.cpp
messagingfw/msgsrvnstore/server/src/MCLENTRY.CPP
messagingfw/msgsrvnstore/server/src/MSVDELET.CPP
messagingfw/msgsrvnstore/server/src/MSVSERV.CPP
messagingfw/msgsrvnstore/server/src/MTCLBASE.CPP
messagingfw/msgsrvnstore/server/src/cmsvtechnologytypedefaultmtmsettings.cpp
messagingfw/msgsrvnstore/server/src/msvindexadapter.cpp
messagingfw/msgsrvnstore/server/src/msvinifile.cpp
messagingfw/watcherfw/src/watcher.cpp
--- a/messagingfw/biomsgfw/IACPSRC/wwwp.CPP	Tue Aug 03 21:08:41 2010 +0530
+++ b/messagingfw/biomsgfw/IACPSRC/wwwp.CPP	Wed Aug 18 01:39:51 2010 +0530
@@ -287,7 +287,7 @@
 #endif // SYMBIAN_BOOKMARK_DATABASE
 
 		// File writing has completed, set the size in the attachment
-		TInt fileSize;
+		TInt fileSize = 0;
 		User::LeaveIfError(file.Size(fileSize));
 		attachment->SetSize(fileSize);
 		
--- a/messagingfw/biomsgfw/wappsrc/wapp.cpp	Tue Aug 03 21:08:41 2010 +0530
+++ b/messagingfw/biomsgfw/wappsrc/wapp.cpp	Wed Aug 18 01:39:51 2010 +0530
@@ -3732,7 +3732,7 @@
 #endif // SYMBIAN_BOOKMARK_DATABASE
 
 		// File writing has completed, set the size in the attachment
-		TInt fileSize;
+		TInt fileSize = 0;
 		User::LeaveIfError(file.Size(fileSize));
 		attachment->SetSize(fileSize);
 		
--- a/messagingfw/msgsrvnstore/server/group/messageserver.iby	Tue Aug 03 21:08:41 2010 +0530
+++ b/messagingfw/msgsrvnstore/server/group/messageserver.iby	Wed Aug 18 01:39:51 2010 +0530
@@ -26,18 +26,18 @@
 #define MSGHEAPMAX  0x400000
 #endif
 
-file=ABI_DIR\BUILD_DIR\MSexe.exe	System\Programs\MSexe.exe	heapmax=MSGHEAPMAX
-file=ABI_DIR\BUILD_DIR\MSGS.dll		System\Libs\MSGS.dll
+file=ABI_DIR\BUILD_DIR\msexe.exe	System\Programs\MSexe.exe	heapmax=MSGHEAPMAX
+file=ABI_DIR\BUILD_DIR\msgs.dll		System\Libs\MSGS.dll
 
-data=EPOCROOT##epoc32\data\Z\private\1000484b\backup_registration.xml		private\1000484b\backup_registration.xml
+data=EPOCROOT##epoc32\data\z\private\1000484b\backup_registration.xml		private\1000484b\backup_registration.xml
 
 #include "messageserver.hby"
 
-data=EPOCROOT##epoc32\data\Z\private\1000484b\msgcache.ini 					private\1000484b\msgcache.ini
+data=EPOCROOT##epoc32\data\z\private\1000484b\msgcache.ini 					private\1000484b\msgcache.ini
 
 #ifdef SYMBIAN_MSGS_ENHANCED_REMOVABLE_MEDIA_SUPPORT
-data=EPOCROOT##epoc32\data\Z\private\1000484b\msgPriorityDriveList.ini 		private\1000484b\msgprioritydrivelist.ini
-data=EPOCROOT##epoc32\data\Z\private\10202BE9\10286a26.txt					private\10202BE9\10286a26.txt
+data=EPOCROOT##epoc32\data\z\private\1000484b\msgprioritydriveList.ini 		private\1000484b\msgprioritydrivelist.ini
+data=EPOCROOT##epoc32\data\z\private\10202BE9\10286a26.txt					private\10202BE9\10286a26.txt
 #endif
 
 #endif
--- a/messagingfw/msgsrvnstore/server/src/CMsvAttachmentManager.cpp	Tue Aug 03 21:08:41 2010 +0530
+++ b/messagingfw/msgsrvnstore/server/src/CMsvAttachmentManager.cpp	Wed Aug 18 01:39:51 2010 +0530
@@ -436,8 +436,8 @@
 	else // attachment->iType == ELinkedFile
 		{
 		RFs fs;
-		fs.Connect();
-		fs.ShareProtected();
+		User::LeaveIfError(fs.Connect());
+		User::LeaveIfError(fs.ShareProtected());  		
 		User::LeaveIfError(attachmentFile.Open(fs, attachment->FilePath(), EFileRead | EFileShareReadersOnly));
 		}
 	
@@ -470,8 +470,8 @@
 	else // attachment->iType == ELinkedFile
 		{
 		RFs fs;
-		fs.Connect();
-		fs.ShareProtected();
+		User::LeaveIfError(fs.Connect());
+		User::LeaveIfError(fs.ShareProtected());
 		User::LeaveIfError(attachmentFile.Open(fs, attachment->FilePath(), EFileWrite));
 		}
 	
--- a/messagingfw/msgsrvnstore/server/src/MCLENTRY.CPP	Tue Aug 03 21:08:41 2010 +0530
+++ b/messagingfw/msgsrvnstore/server/src/MCLENTRY.CPP	Wed Aug 18 01:39:51 2010 +0530
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -2788,13 +2788,20 @@
 //
 	{
 	TInt count = aSelection.Count();
-	while (count--)
-		{
-		if (!IsAChild(aSelection.At(count)))
-			{
-			return EFalse;
-			}
-		}
+	if(!count)
+	    {
+        return EFalse;
+	    }
+	else
+	    {
+        while (count--)
+            {
+            if (!IsAChild(aSelection.At(count)))
+                {
+                return EFalse;
+                }
+            }
+	    }
 	return ETrue;
 	}
 
--- a/messagingfw/msgsrvnstore/server/src/MSVDELET.CPP	Tue Aug 03 21:08:41 2010 +0530
+++ b/messagingfw/msgsrvnstore/server/src/MSVDELET.CPP	Wed Aug 18 01:39:51 2010 +0530
@@ -310,6 +310,11 @@
 	CDir* dir=NULL;
 	TBool partiallyDeleted=EFalse;
 	TInt error = iServer.GetFileDirectoryListing(id, filename, dir);
+	if(dir)
+        {
+	    CleanupStack::PushL(dir);
+        }
+	
 	if (error==KErrNone)
 		{
 		User::LeaveIfError(iServer.FileSession().SetSessionPath(filename));
@@ -386,7 +391,10 @@
 	// deletion was successful
 	iDeletedEntries->AppendL(id); // will not leave, space has been reserved
 	iMovedEntries->AppendL(id);   // will not leave, space has been reserved
-	delete dir;
+	if(dir)
+        {
+	    CleanupStack::PopAndDestroy(dir);
+        }
 	return;
 
 failed:
@@ -424,7 +432,11 @@
 	// we have failed, move onto next state
 	iState = iPCSynced ? EIndexIndividually : EIndex;
 	iError=error;
-	delete dir;
+	if(dir)
+        {
+	    CleanupStack::PopAndDestroy(dir);
+        }
+	    
 	}
 
 
--- a/messagingfw/msgsrvnstore/server/src/MSVSERV.CPP	Tue Aug 03 21:08:41 2010 +0530
+++ b/messagingfw/msgsrvnstore/server/src/MSVSERV.CPP	Wed Aug 18 01:39:51 2010 +0530
@@ -2094,7 +2094,7 @@
 void CMsvServer::BuildDefaultIniFileL(TMsvConfig& aConfig)
 	{
 	RFs fileSession;
-	fileSession.Connect();
+	User::LeaveIfError(fileSession.Connect());
 
 	TInt error;
 	TVolumeInfo volume;
@@ -2195,7 +2195,7 @@
 
 				//create a new ini file
 				RFs fileSession;
-				fileSession.Connect();
+				User::LeaveIfError(fileSession.Connect());
 
 				TInt error;
 				TVolumeInfo volume;
--- a/messagingfw/msgsrvnstore/server/src/MTCLBASE.CPP	Tue Aug 03 21:08:41 2010 +0530
+++ b/messagingfw/msgsrvnstore/server/src/MTCLBASE.CPP	Wed Aug 18 01:39:51 2010 +0530
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -84,7 +84,10 @@
 	delete iParaFormatLayer;
 	iRegisteredMtmDll.ReleaseLibrary();
 	delete iAttachmentWaiter;
-	delete iExtensionData;
+	if(iExtensionData)
+  		{
+		delete iExtensionData;    
+  		}	
 	}
 
 
--- a/messagingfw/msgsrvnstore/server/src/cmsvtechnologytypedefaultmtmsettings.cpp	Tue Aug 03 21:08:41 2010 +0530
+++ b/messagingfw/msgsrvnstore/server/src/cmsvtechnologytypedefaultmtmsettings.cpp	Wed Aug 18 01:39:51 2010 +0530
@@ -230,7 +230,8 @@
 	CleanupStack::PushL( regMtmDllArray );
 
 	RMsvServerSession session;
-	session.Connect(iFs);
+	User::LeaveIfError(session.Connect(iFs));
+	
 	session.FillRegisteredMtmDllArray(aMtmTypeUid, *regMtmDllArray, KMsvDefaultTimeoutMicroSeconds32);
 	session.Close();
 	
--- a/messagingfw/msgsrvnstore/server/src/msvindexadapter.cpp	Tue Aug 03 21:08:41 2010 +0530
+++ b/messagingfw/msgsrvnstore/server/src/msvindexadapter.cpp	Wed Aug 18 01:39:51 2010 +0530
@@ -432,7 +432,7 @@
 	iServer.Log(_L("Cache initialized succesfully."));
 #endif
 
-	TMsvId tmpNextId = NULL;
+	TMsvId tmpNextId = 0;
 	iDbAdapter->GetMaxTMsvIdL(tmpNextId);
 	iNextCreateId = (tmpNextId >= KFirstFreeEntryId)? (tmpNextId+1) : KFirstFreeEntryId;
 	
--- a/messagingfw/msgsrvnstore/server/src/msvinifile.cpp	Tue Aug 03 21:08:41 2010 +0530
+++ b/messagingfw/msgsrvnstore/server/src/msvinifile.cpp	Wed Aug 18 01:39:51 2010 +0530
@@ -87,7 +87,7 @@
 	
 	// Open file
 	TAutoClose<RFile> file;
-	TInt size;
+	TInt size = 0;
 	User::LeaveIfError(file.iObj.Open(fs.iObj,*iName,EFileStreamText|EFileShareReadersOrWriters));
 	file.PushL();
 
--- a/messagingfw/watcherfw/src/watcher.cpp	Tue Aug 03 21:08:41 2010 +0530
+++ b/messagingfw/watcherfw/src/watcher.cpp	Wed Aug 18 01:39:51 2010 +0530
@@ -43,6 +43,7 @@
 	// Launch the start-up manager that will launch the watchers in the 
  	// correct start-up state
 	CWatcherSSAStartupMgr* startupMgr = CWatcherSSAStartupMgr::NewL();
+	CleanupStack::PushL(startupMgr);
 
 	// The System Starter is waiting for us (start_method = EWaitForStart)
 	// so we rendez-vous so it can start the next process in the SSC
@@ -53,7 +54,7 @@
 	CActiveScheduler::Start();
 	
 	// Tidy up
-	CleanupStack::PopAndDestroy(scheduler);
+	CleanupStack::PopAndDestroy(2, scheduler);
 	}
 
 static TInt DoLaunchThread(TAny*)