aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap/camel-imap-store.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/providers/imap/camel-imap-store.c')
-rw-r--r--camel/providers/imap/camel-imap-store.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index 29baae5b48..22a730e933 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -351,16 +351,24 @@ imap_connect (CamelService *service, CamelException *ex)
status != CAMEL_IMAP_FAIL && result ? result :
"Unknown error");
}
+
+ /* FIXME: parse for capabilities here. */
+ d(fprintf (stderr, "%s\n", result));
+
+ if (e_strstrcase (result, "IMAP4REV1"))
+ store->server_level = IMAP_LEVEL_IMAP4REV1;
+ else if (e_strstrcase (result, "IMAP4"))
+ store->server_level = IMAP_LEVEL_IMAP4;
+ else
+ store->server_level = IMAP_LEVEL_UNKNOWN;
- if (e_strstrcase (result, "SEARCH"))
- store->has_search_capability = TRUE;
+ if ((store->server_level >= IMAP_LEVEL_IMAP4REV1) || (e_strstrcase (result, "STATUS")))
+ store->has_status_capability = TRUE;
else
- store->has_search_capability = FALSE;
+ store->has_status_capability = FALSE;
g_free (result);
- d(fprintf (stderr, "IMAP provider does%shave SEARCH support\n", store->has_search_capability ? " " : "n't "));
-
/* We now need to find out which directory separator this daemon uses */
status = camel_imap_command_extended (store, NULL, &result, "LIST \"\" \"\"");