aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-08-14 06:17:00 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-08-14 06:17:00 +0800
commit106b05d139f79a88dfb0878157da074830af2904 (patch)
treef595d6c03ea6dde32e21c726026cca7581ab0736 /camel/providers/imap
parent681cee1a1d0000f865f96624299afc917975bc45 (diff)
downloadgsoc2013-evolution-106b05d139f79a88dfb0878157da074830af2904.tar.gz
gsoc2013-evolution-106b05d139f79a88dfb0878157da074830af2904.tar.zst
gsoc2013-evolution-106b05d139f79a88dfb0878157da074830af2904.zip
We need to be ref'ing the folder if/when we add it to the hash. This may
2001-08-13 Jeffrey Stedfast <fejj@ximian.com> * camel-store.c (camel_store_get_folder): We need to be ref'ing the folder if/when we add it to the hash. This may fix bug #6089? svn path=/trunk/; revision=11968
Diffstat (limited to 'camel/providers/imap')
-rw-r--r--camel/providers/imap/camel-imap-store.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index 9eff81ecf3..b4c01110ea 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -868,13 +868,13 @@ get_folder_online (CamelStore *store, const char *folder_name,
CamelImapResponse *response;
CamelFolder *new_folder;
char *folder_dir;
-
+
if (!camel_remote_store_connected (CAMEL_REMOTE_STORE (store), ex))
return NULL;
-
+
if (!g_strcasecmp (folder_name, "INBOX"))
folder_name = "INBOX";
-
+
/* Lock around the whole lot to check/create atomically */
CAMEL_IMAP_STORE_LOCK (imap_store, command_lock);
if (imap_store->current_folder) {
@@ -886,12 +886,12 @@ get_folder_online (CamelStore *store, const char *folder_name,
if (!response) {
if (!flags & CAMEL_STORE_FOLDER_CREATE)
return no_such_folder (folder_name, ex);
-
+
response = camel_imap_command (imap_store, NULL, ex,
"CREATE %F", folder_name);
if (response) {
camel_imap_response_free (imap_store, response);
-
+
response = camel_imap_command (imap_store, NULL, NULL,
"SELECT %F", folder_name);
}
@@ -900,7 +900,7 @@ get_folder_online (CamelStore *store, const char *folder_name,
return NULL;
}
}
-
+
folder_dir = e_path_to_physical (imap_store->storage_path, folder_name);
new_folder = camel_imap_folder_new (store, folder_name, folder_dir, ex);
g_free (folder_dir);
@@ -916,9 +916,9 @@ get_folder_online (CamelStore *store, const char *folder_name,
}
}
camel_imap_response_free_without_processing (imap_store, response);
-
+
CAMEL_IMAP_STORE_UNLOCK (imap_store, command_lock);
-
+
return new_folder;
}
@@ -929,21 +929,21 @@ get_folder_offline (CamelStore *store, const char *folder_name,
CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
CamelFolder *new_folder;
char *folder_dir;
-
+
if (!imap_store->connected &&
!camel_service_connect (CAMEL_SERVICE (store), ex))
return NULL;
-
+
if (!g_strcasecmp (folder_name, "INBOX"))
folder_name = "INBOX";
-
+
folder_dir = e_path_to_physical (imap_store->storage_path, folder_name);
if (access (folder_dir, F_OK) != 0)
return no_such_folder (folder_name, ex);
-
+
new_folder = camel_imap_folder_new (store, folder_name, folder_dir, ex);
g_free (folder_dir);
-
+
return new_folder;
}