[evolution-kolab/ek-wip-porting: 13/15] KolabMailImapClient: fixed online (non-DB) folder info query



commit 9d6776aa3ba99839a075ce4c7f25474bcaea2c1a
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Sat Sep 8 18:42:23 2012 +0200

    KolabMailImapClient: fixed online (non-DB) folder info query
    
    * properly skip folders for which retrieving folder
      info from server yields an error
    * do not try to propagate an error where there is
      none

 src/libekolab/kolab-mail-imap-client.c |   19 +++++++------------
 1 files changed, 7 insertions(+), 12 deletions(-)
---
diff --git a/src/libekolab/kolab-mail-imap-client.c b/src/libekolab/kolab-mail-imap-client.c
index b8c7801..880ff8b 100644
--- a/src/libekolab/kolab-mail-imap-client.c
+++ b/src/libekolab/kolab-mail-imap-client.c
@@ -1496,24 +1496,19 @@ kolab_mail_imap_client_query_folder_info_online (KolabMailImapClient *self,
 		                                                  cancellable,
 		                                                  &tmp_err);
 		if (tmp_err != NULL) {
-			g_debug ("%s()[%i]: %s", __func__, __LINE__, tmp_err->message);
+			g_warning ("%s()[%i]: %s", __func__, __LINE__, tmp_err->message);
 			g_error_free (tmp_err);
 			tmp_err = NULL;
+		} else {
+			desc = kolab_util_folder_descriptor_new (foldername,
+			                                         type_id);
+			folder_desc = g_list_prepend (folder_desc, desc);
 		}
-
-		desc = kolab_util_folder_descriptor_new (foldername,
-		                                         type_id);
-		folder_desc = g_list_prepend (folder_desc, desc);
-
+		
 		folder_names_ptr = g_list_next (folder_names_ptr);
 	}
 
-	if (tmp_err != NULL) {
-		g_propagate_error (err, tmp_err);
-		kolab_util_glib_glist_free (folder_names);
-		kolab_util_folder_descriptor_glist_free (folder_desc);
-		return NULL;
-	}
+	kolab_util_glib_glist_free (folder_names);
 
 	return folder_desc;
 }



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