aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-03-11 15:47:41 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-03-11 15:47:41 +0800
commit4138eb99da5fdc980384e64acc933d0d174d0842 (patch)
tree21b9f79c53a28ff2936f06d09d53ff27a6197825 /camel
parent5d8c6901ebafda375152a85d3b6b1f24811ee847 (diff)
downloadgsoc2013-evolution-4138eb99da5fdc980384e64acc933d0d174d0842.tar
gsoc2013-evolution-4138eb99da5fdc980384e64acc933d0d174d0842.tar.gz
gsoc2013-evolution-4138eb99da5fdc980384e64acc933d0d174d0842.tar.bz2
gsoc2013-evolution-4138eb99da5fdc980384e64acc933d0d174d0842.tar.lz
gsoc2013-evolution-4138eb99da5fdc980384e64acc933d0d174d0842.tar.xz
gsoc2013-evolution-4138eb99da5fdc980384e64acc933d0d174d0842.tar.zst
gsoc2013-evolution-4138eb99da5fdc980384e64acc933d0d174d0842.zip
removed this. not sure what it was doing there, a 1 line funciton used
2004-03-11 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (no_such_folder): removed this. not sure what it was doing there, a 1 line funciton used once. (get_folder_online): pass exception to camel_imap_command. if we got a user cancel, pass it up. (hash_folder_name, compare_folder_name): more g_ascii_strcasecmp stuff. svn path=/trunk/; revision=25026
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog10
-rw-r--r--camel/providers/imap/camel-imap-store.c30
2 files changed, 24 insertions, 16 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 45455e78a1..5a8c3949c7 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,15 @@
2004-03-11 Not Zed <NotZed@Ximian.com>
+ * providers/imap/camel-imap-store.c (no_such_folder): removed
+ this. not sure what it was doing there, a 1 line funciton used
+ once.
+ (get_folder_online): pass exception to camel_imap_command. if we
+ got a user cancel, pass it up. See #55388.
+ (hash_folder_name, compare_folder_name): more g_ascii_strcasecmp
+ stuff.
+
+2004-03-11 Not Zed <NotZed@Ximian.com>
+
* camel-vee-store.c (vee_get_folder_info): we need to add the
folderinfo always if we're recursive from top. Should fix #52965
and maybe the other vfolders not showing on startup bug.
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index 9143a1f090..c0c77e96c7 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -1675,7 +1675,7 @@ imap_noop (CamelStore *store, CamelException *ex)
static guint
hash_folder_name (gconstpointer key)
{
- if (strcasecmp (key, "INBOX") == 0)
+ if (g_ascii_strcasecmp (key, "INBOX") == 0)
return g_str_hash ("INBOX");
else
return g_str_hash (key);
@@ -1686,21 +1686,13 @@ compare_folder_name (gconstpointer a, gconstpointer b)
{
gconstpointer aname = a, bname = b;
- if (strcasecmp (a, "INBOX") == 0)
+ if (g_ascii_strcasecmp (a, "INBOX") == 0)
aname = "INBOX";
- if (strcasecmp (b, "INBOX") == 0)
+ if (g_ascii_strcasecmp (b, "INBOX") == 0)
bname = "INBOX";
return g_str_equal (aname, bname);
}
-static CamelFolder *
-no_such_folder (const char *name, CamelException *ex)
-{
- camel_exception_setv (ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("No such folder %s"), name);
- return NULL;
-}
-
static int
get_folder_status (CamelImapStore *imap_store, const char *folder_name, const char *type)
{
@@ -1743,14 +1735,13 @@ get_folder_status (CamelImapStore *imap_store, const char *folder_name, const ch
}
static CamelFolder *
-get_folder_online (CamelStore *store, const char *folder_name,
- guint32 flags, CamelException *ex)
+get_folder_online (CamelStore *store, const char *folder_name, guint32 flags, CamelException *ex)
{
CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
CamelImapResponse *response;
CamelFolder *new_folder;
char *folder_dir, *storage_path;
-
+
if (!camel_imap_store_connected (imap_store, ex))
return NULL;
@@ -1763,13 +1754,20 @@ get_folder_online (CamelStore *store, const char *folder_name,
camel_object_unref (imap_store->current_folder);
imap_store->current_folder = NULL;
}
- response = camel_imap_command (imap_store, NULL, NULL, "SELECT %F", folder_name);
+ response = camel_imap_command (imap_store, NULL, ex, "SELECT %F", folder_name);
if (!response) {
char *folder_real;
+ if (camel_exception_get_id(ex) == CAMEL_EXCEPTION_USER_CANCEL) {
+ CAMEL_SERVICE_UNLOCK (imap_store, connect_lock);
+ return NULL;
+ }
+
if (!flags & CAMEL_STORE_FOLDER_CREATE) {
CAMEL_SERVICE_UNLOCK (imap_store, connect_lock);
- return no_such_folder (folder_name, ex);
+ camel_exception_setv (ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
+ _("No such folder %s"), folder_name);
+ return NULL;
}
folder_real = camel_imap_store_summary_path_to_full(imap_store->summary, folder_name, store->dir_sep);