[PATCH] 2 small bugfixes in tny_camel_store_account_store_refresh()



Hello all,

attached 2 small bufixes about the store_account_refresh() introduced
some time ago :

	-fix a reference leak
	-fix we were reporting the subfolders to the observers
	instead of just the folders

Regards,

-- 
Martin
Index: libtinymail-camel/tny-camel-store-account.c
===================================================================
--- libtinymail-camel/tny-camel-store-account.c	(révision 3803)
+++ libtinymail-camel/tny-camel-store-account.c	(copie de travail)
@@ -1669,16 +1669,17 @@
 
 	priv->cant_reuse_iter = FALSE;
 
+	if (priv->iter_store) {
+		camel_object_unref (CAMEL_OBJECT (priv->iter_store));
+	}
+
 	camel_object_ref (CAMEL_OBJECT (store));
 	priv->iter_store = store;
 
 	iter = priv->iter;
 
-	if (iter)
+	while (iter)
 	{
-	  iter = iter->child;
-	  while (iter)
-	  {
 		/* Also take a look at camel-maildir-store.c:525 */
 		if (!(iter->flags & CAMEL_FOLDER_VIRTUAL))
 		{
@@ -1698,7 +1699,6 @@
 			g_object_unref (folder);
 		}
 		iter = iter->next;
-	  }
 	}
 
 
Index: ChangeLog
===================================================================
--- ChangeLog	(révision 3803)
+++ ChangeLog	(copie de travail)
@@ -1,3 +1,11 @@
+2008-11-17  Martin Bonnin  <martinbonnin gmail com>
+
+	* libtinymail-camel/tny-camel-store-account.c:
+	2 small bugfixes in tny_camel_store_account_store_refresh().
+	-fix a reference leak
+	-fix we were reporting the subfolders to the observer
+	instead of just the folders
+	
 2008-11-13  Thomas Guillem  <thomas guillem gmail com>
 
 	* libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-message-cache.c:


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