aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap/camel-imap-folder.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@src.gnome.org>2000-06-18 08:18:57 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-06-18 08:18:57 +0800
commitf4ae655f41b3fdbfda2aa69a7662fa09578a87c7 (patch)
tree2e1d24af5083e724ae417a3604d90bf3348d8124 /camel/providers/imap/camel-imap-folder.c
parent98ee88c4160e5d0d9fa03333e6b05b01841f099f (diff)
downloadgsoc2013-evolution-f4ae655f41b3fdbfda2aa69a7662fa09578a87c7.tar
gsoc2013-evolution-f4ae655f41b3fdbfda2aa69a7662fa09578a87c7.tar.gz
gsoc2013-evolution-f4ae655f41b3fdbfda2aa69a7662fa09578a87c7.tar.bz2
gsoc2013-evolution-f4ae655f41b3fdbfda2aa69a7662fa09578a87c7.tar.lz
gsoc2013-evolution-f4ae655f41b3fdbfda2aa69a7662fa09578a87c7.tar.xz
gsoc2013-evolution-f4ae655f41b3fdbfda2aa69a7662fa09578a87c7.tar.zst
gsoc2013-evolution-f4ae655f41b3fdbfda2aa69a7662fa09578a87c7.zip
camel/providers/imap/camel-imap-folder.c: CAPABILITY now works like it should
po/POTFILES.in: removed reference to camel/providers/imap/imap.c - this was just a temporary file to use as a reference for IMAP code svn path=/trunk/; revision=3623
Diffstat (limited to 'camel/providers/imap/camel-imap-folder.c')
-rw-r--r--camel/providers/imap/camel-imap-folder.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 1b0de9ca5f..74148d3d92 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -208,21 +208,26 @@ imap_init (CamelFolder *folder, CamelStore *parent_store, CamelFolder *parent_fo
/* now lets find out if we can do searches... */
status = camel_imap_command_extended (CAMEL_IMAP_STORE (folder->parent_store), folder,
&result, "CAPABILITY");
+
+ /* ugh, I forgot that CAPABILITY doesn't have a response code */
if (status != CAMEL_IMAP_OK) {
CamelService *service = CAMEL_SERVICE (folder->parent_store);
+
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 :
"Unknown error");
}
-
- if (strstr (result, "SEARCH"))
+
+ if (strstrcase (result, "SEARCH"))
folder->has_search_capability = TRUE;
else
folder->has_search_capability = FALSE;
g_free (result);
+
+ fprintf (stderr, "IMAP provider does%shave SEARCH support\n", folder->has_search_capability ? " " : "n't ");
/* some IMAP daemons support user-flags *
* I would not, however, rely on this feature as *
@@ -242,6 +247,7 @@ imap_init (CamelFolder *folder, CamelStore *parent_store, CamelFolder *parent_fo
&result, "SELECT %s", folder->full_name);
if (status != CAMEL_IMAP_OK) {
CamelService *service = CAMEL_SERVICE (folder->parent_store);
+
camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
"Could not SELECT %s on IMAP server %s: %s.",
folder->full_name, service->url->host,