From 98c56f99098bcc023524e6f162ce4a216298f06a Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 13 Jul 2000 20:24:09 +0000 Subject: Updated to use CAMEL_IMAP_OK, CAMEL_IMAP_NO, CAMEL_IMAP_BAD, and 2000-07-13 Jeffrey Stedfast * providers/imap/camel-imap-folder.c: * providers/imap/camel-imap-store.c: Updated to use CAMEL_IMAP_OK, CAMEL_IMAP_NO, CAMEL_IMAP_BAD, and CAMEL_IMAP_FAIL rather than the ones copied from the POP3 provider. svn path=/trunk/; revision=4155 --- camel/providers/imap/camel-imap-store.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'camel/providers/imap/camel-imap-store.c') diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c index 2fdbe5545a..717c407b58 100644 --- a/camel/providers/imap/camel-imap-store.c +++ b/camel/providers/imap/camel-imap-store.c @@ -111,7 +111,7 @@ camel_imap_store_get_type (void) { static GtkType camel_imap_store_type = 0; - if (!camel_imap_store_type) { + if (!camel_imap_store_type) { GtkTypeInfo camel_imap_store_info = { "CamelImapStore", @@ -123,7 +123,7 @@ camel_imap_store_get_type (void) /* reserved_2 */ NULL, (GtkClassInitFunc) NULL, }; - + camel_imap_store_type = gtk_type_unique (CAMEL_STORE_TYPE, &camel_imap_store_info); } @@ -332,7 +332,7 @@ imap_connect (CamelService *service, CamelException *ex) camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE, "Could not get capabilities on IMAP server %s: %s.", service->url->host, - status == CAMEL_IMAP_ERR ? result : + status != CAMEL_IMAP_FAIL && result ? result : "Unknown error"); } @@ -442,7 +442,7 @@ imap_create (CamelFolder *folder, CamelException *ex) camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE, "Could not CREATE %s on IMAP server %s: %s.", folder_path, service->url->host, - status == CAMEL_IMAP_ERR ? result : + status != CAMEL_IMAP_FAIL && result ? result : "Unknown error"); g_free (result); g_free (folder_path); @@ -496,7 +496,9 @@ camel_imap_status (char *cmdid, char *respbuf) if (!strncmp (retcode, "OK", 2)) return CAMEL_IMAP_OK; else if (!strncmp (retcode, "NO", 2)) - return CAMEL_IMAP_ERR; + return CAMEL_IMAP_NO; + else if (!strncmp (retcode, "BAD", 3)) + return CAMEL_IMAP_BAD; } } @@ -532,9 +534,6 @@ camel_imap_command (CamelImapStore *store, CamelFolder *folder, char **ret, char va_list ap; gint status = CAMEL_IMAP_OK; - if (folder) - printf ("*** Current folder = %s\n", store->current_folder->full_name); - if (folder && store->current_folder != folder && strncmp (fmt, "STATUS", 6) && strncmp (fmt, "CREATE", 5) && strcmp (fmt, "CAPABILITY")) { /* We need to select the correct mailbox first */ -- cgit v1.2.3