diff options
author | Peter Williams <peterw@src.gnome.org> | 2000-09-06 04:08:10 +0800 |
---|---|---|
committer | Peter Williams <peterw@src.gnome.org> | 2000-09-06 04:08:10 +0800 |
commit | b1e66c4c60ca6d52c0a164a510e5199ca201bf98 (patch) | |
tree | 8a3bdab58ee5ba9a3374c77fa867bd19585a05ed /camel/providers/imap/camel-imap-store.c | |
parent | a86c7ea0ab3775cc8fb141c1792c3b2bdb663a34 (diff) | |
download | gsoc2013-evolution-b1e66c4c60ca6d52c0a164a510e5199ca201bf98.tar gsoc2013-evolution-b1e66c4c60ca6d52c0a164a510e5199ca201bf98.tar.gz gsoc2013-evolution-b1e66c4c60ca6d52c0a164a510e5199ca201bf98.tar.bz2 gsoc2013-evolution-b1e66c4c60ca6d52c0a164a510e5199ca201bf98.tar.lz gsoc2013-evolution-b1e66c4c60ca6d52c0a164a510e5199ca201bf98.tar.xz gsoc2013-evolution-b1e66c4c60ca6d52c0a164a510e5199ca201bf98.tar.zst gsoc2013-evolution-b1e66c4c60ca6d52c0a164a510e5199ca201bf98.zip |
Cleanup of lots of exception handling ; bugfixes
svn path=/trunk/; revision=5202
Diffstat (limited to 'camel/providers/imap/camel-imap-store.c')
-rw-r--r-- | camel/providers/imap/camel-imap-store.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c index 820c2453ce..5ffdd51d4b 100644 --- a/camel/providers/imap/camel-imap-store.c +++ b/camel/providers/imap/camel-imap-store.c @@ -95,7 +95,8 @@ camel_imap_store_init (gpointer object, gpointer klass) service->url_flags |= (CAMEL_SERVICE_URL_NEED_USER | CAMEL_SERVICE_URL_NEED_HOST | - CAMEL_SERVICE_URL_ALLOW_PATH); + CAMEL_SERVICE_URL_ALLOW_PATH | + CAMEL_SERVICE_URL_ALLOW_AUTH); imap_store->dir_sep = g_strdup ("/"); /*default*/ imap_store->current_folder = NULL; @@ -231,6 +232,7 @@ imap_connect (CamelService *service, CamelException *ex) errbuf = g_strdup_printf ("Unable to authenticate to IMAP server.\n" "%s\n\n", camel_exception_get_description (ex)); + camel_exception_clear (ex); } else { g_message ("IMAP Service sucessfully authenticated user %s", service->url->user); authenticated = TRUE; @@ -280,8 +282,10 @@ imap_connect (CamelService *service, CamelException *ex) } g_free (result); - - return TRUE; + + camel_remote_store_refresh_folders (CAMEL_REMOTE_STORE (store), ex); + + return ! camel_exception_is_set (ex); } static gboolean @@ -336,7 +340,6 @@ imap_folder_exists (CamelFolder *folder, CamelException *ex) &result, ex, "EXAMINE %s", folder_path); if (status != CAMEL_IMAP_OK) { - g_free (result); g_free (folder_path); return FALSE; } @@ -439,6 +442,9 @@ get_folder (CamelStore *store, const char *folder_name, gboolean create, CamelEx new_folder = camel_imap_folder_new (store, folder_path, ex); + if (camel_exception_is_set (ex)) + return NULL; + /* this is the top-level dir, we already know it exists - it has to! */ if (!strcmp (folder_name, dir_sep)) return new_folder; |