[evolution-data-server] Bug #624702 - Cann't create a new folder in imapx



commit 739650cb086cede71e59007e10923bde71be8988
Author: Milan Crha <mcrha redhat com>
Date:   Thu Sep 2 11:28:49 2010 +0200

    Bug #624702 - Cann't create a new folder in imapx

 camel/providers/imapx/camel-imapx-conn-manager.c |    2 +-
 camel/providers/imapx/camel-imapx-server.c       |    4 +++-
 camel/providers/imapx/camel-imapx-store.c        |    2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-conn-manager.c b/camel/providers/imapx/camel-imapx-conn-manager.c
index 6351c60..19f819e 100644
--- a/camel/providers/imapx/camel-imapx-conn-manager.c
+++ b/camel/providers/imapx/camel-imapx-conn-manager.c
@@ -53,7 +53,7 @@ free_connection (gpointer data, gpointer user_data)
 	ConnectionInfo *cinfo = (ConnectionInfo *) data;
 	CamelIMAPXServer *conn = cinfo->conn;
 
-	camel_imapx_server_connect (conn, 0);
+	camel_imapx_server_connect (conn, NULL);
 
 	g_object_unref (conn);
 	g_hash_table_destroy (cinfo->folders);
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index a4c2d6e..a9f3c52 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -4871,8 +4871,10 @@ camel_imapx_server_connect (CamelIMAPXServer *is, GError **error)
 {
 	gboolean success;
 
-	if (is->state == IMAPX_SHUTDOWN)
+	if (is->state == IMAPX_SHUTDOWN) {
+		g_set_error (error, CAMEL_SERVICE_ERROR, CAMEL_SERVICE_ERROR_UNAVAILABLE, "Shutting down");
 		return FALSE;
+	}
 
 	if (is->state >= IMAPX_INITIALISED)
 		return TRUE;
diff --git a/camel/providers/imapx/camel-imapx-store.c b/camel/providers/imapx/camel-imapx-store.c
index 5a1ff4a..b7ef310 100644
--- a/camel/providers/imapx/camel-imapx-store.c
+++ b/camel/providers/imapx/camel-imapx-store.c
@@ -885,7 +885,7 @@ imapx_create_folder (CamelStore *store, const gchar *parent_name, const gchar *f
 	success = camel_imapx_server_create_folder (server, full_name, error);
 	g_object_unref(server);
 
-	if (!success) {
+	if (success) {
 		CamelIMAPXStoreInfo *si;
 
 		si = camel_imapx_store_summary_add_from_full(istore->summary, full_name, dir_sep);



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