pimappservices/calendar/server/src/agssess.cpp
changeset 89 b57382753122
parent 45 b6db4fd4947b
--- a/pimappservices/calendar/server/src/agssess.cpp	Fri Oct 15 12:10:36 2010 +0530
+++ b/pimappservices/calendar/server/src/agssess.cpp	Wed Nov 03 17:12:22 2010 +0530
@@ -142,24 +142,7 @@
 			{
 			return EFalse;
 			}
-
-		// Check for the requested entry type and the change type.
-		// Don't notify clients which are listening for event and
-		// to-do notifictaions when note event is modified.
-		if ( ((iEntryType == MCalChangeCallBack2::EChangeEntryEvent) ||
-			(iEntryType == MCalChangeCallBack2::EChangeEntryTodo)) &&
-			(aChange.iEntryType == CCalEntry::ENote))
-			{
-			return EFalse;
-			}
-
-		// Notify clients which are listening for event type note modifications.
-		if (iEntryType == MCalChangeCallBack2::EChangeEntryNote &&
-			aChange.iEntryType == CCalEntry::ENote)
-			{
-			return ETrue;
-			}
-
+		
 		// Check the entry is within the time range specified by the filter
 		// aChange.iRepeatRule gives the repeat data for the newly stored entry. If this operation is an update,
 		// then aChange.iOriginalRepeatRule gives the repeat data for the old entry.
@@ -298,7 +281,7 @@
 */
 TBool CAgnServerSession::CheckBackupRestore()
     {
-    if(iBackupRestoreLock  
+    if((iBackupRestoreLock || iAgnServer.BackupRestoreInProgress()) 
     //All opeerations apart from the following ones are not allowed when Backup\Restore is in progress. 
     && iMessage.Function() != ECloseAgenda
     && iMessage.Function() != ECancelChangeNotification
@@ -2083,6 +2066,16 @@
 	// Restore length
 	const TInt KBufferSize = iMessage.GetDesLength(KSlot2);
 	
+    if (KBufferSize == KErrArgument)
+        {
+        PanicClientL(EIndexError);
+        }
+    else if (KBufferSize == KErrBadDescriptor)
+        {
+        PanicClientL(EBadDescriptor);
+        }
+    User::LeaveIfError(KBufferSize);
+	
 	// Restore buffer
 	CBufFlat* buffer = CBufFlat::NewL(KBufferSize);
 	CleanupStack::PushL(buffer);
@@ -4063,7 +4056,7 @@
             {
              // Clear all the notifications in the buffer
             iFileBufferedNotification->Reset();
-            iFileBufferedNotificationStream.Open(*iBufferedNotification);       
+            iFileBufferedNotificationStream.Open(*iFileBufferedNotification);       
         
             // Add a single 'Undefined Change' notification to the notification buffer
             CAgnFileChangeInfo* fileChang = CAgnFileChangeInfo::NewL(NULL, MCalFileChangeObserver::ECalendarInfoUpdated);