Bug in TnyMergeFolder update observer function ?



Hi, i think i found one bug in notification function of 
TnyMergeFolder class. This kind of virtual folders acts 
as observer of real folders. It propagates changes received
to real folder observed. However, i think for some changes, 
its using 'change' parameter rather than new_change variable, 
so data of original change was lost.

-- 
Index: libtinymail/tny-merge-folder.c
===================================================================
--- libtinymail/tny-merge-folder.c	(revision 2529)
+++ libtinymail/tny-merge-folder.c	(working copy)
@@ -1166,7 +1166,7 @@
 		while (!tny_iterator_is_done (iter))
 		{
 			TnyHeader *header = TNY_HEADER (tny_iterator_get_current (iter));
-			tny_folder_change_add_expunged_header (change, header);
+			tny_folder_change_add_expunged_header (new_change, header);
 			g_object_unref (header);
 			tny_iterator_next (iter);
 		}
@@ -1177,7 +1177,7 @@
 	if(tny_folder_change_get_changed (change) & TNY_FOLDER_CHANGE_CHANGED_MSG_RECEIVED)
 	{
 		TnyMsg *msg = tny_folder_change_get_received_msg (change);
-		tny_folder_change_set_received_msg (change, msg);
+		tny_folder_change_set_received_msg (new_change, msg);
 		g_object_unref (msg);
 	}
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]