Bug #624702 - Cann't create a new folder in imapx
authorMilan Crha <mcrha@redhat.com>
Thu, 2 Sep 2010 09:28:49 +0000 (11:28 +0200)
committerMilan Crha <mcrha@redhat.com>
Thu, 2 Sep 2010 09:28:49 +0000 (11:28 +0200)
camel/providers/imapx/camel-imapx-conn-manager.c
camel/providers/imapx/camel-imapx-server.c
camel/providers/imapx/camel-imapx-store.c

index 6351c60..19f819e 100644 (file)
@@ -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);
index a4c2d6e..a9f3c52 100644 (file)
@@ -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;
index 5a1ff4a..b7ef310 100644 (file)
@@ -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);