pimappservices/calendar/server/src/agssess.cpp
branchRCL_3
changeset 65 12af337248b1
parent 59 aba12c885d83
child 66 bd7edf625bdd
--- a/pimappservices/calendar/server/src/agssess.cpp	Thu Aug 19 09:53:43 2010 +0300
+++ b/pimappservices/calendar/server/src/agssess.cpp	Tue Aug 31 15:13:43 2010 +0300
@@ -142,7 +142,24 @@
 			{
 			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.
@@ -2066,16 +2083,6 @@
 	// 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);
@@ -4056,7 +4063,7 @@
             {
              // Clear all the notifications in the buffer
             iFileBufferedNotification->Reset();
-            iFileBufferedNotificationStream.Open(*iFileBufferedNotification);       
+            iFileBufferedNotificationStream.Open(*iBufferedNotification);       
         
             // Add a single 'Undefined Change' notification to the notification buffer
             CAgnFileChangeInfo* fileChang = CAgnFileChangeInfo::NewL(NULL, MCalFileChangeObserver::ECalendarInfoUpdated);