aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-09-23 02:44:07 +0800
committerDan Winship <danw@src.gnome.org>2000-09-23 02:44:07 +0800
commit0eb67058be341cdc5f06e53aa018c7124c4cff58 (patch)
tree3fee9584fcd4dfb194b5f208cf2729f9f40419f2 /camel
parent561de418565c43c36bb345cd15d6f02a64553849 (diff)
downloadgsoc2013-evolution-0eb67058be341cdc5f06e53aa018c7124c4cff58.tar.gz
gsoc2013-evolution-0eb67058be341cdc5f06e53aa018c7124c4cff58.tar.zst
gsoc2013-evolution-0eb67058be341cdc5f06e53aa018c7124c4cff58.zip
The root folder's name is "", not the namespace. (camel_imap_folder_new):
* providers/imap/camel-imap-folder.c (imap_get_subfolder_info_internal): The root folder's name is "", not the namespace. (camel_imap_folder_new): constify folder_name. * providers/imap/camel-imap-store.c (get_folder): Create the folder with folder_name, not folder_path. (camel_imap_command_preliminary): Don't free cmdid here. svn path=/trunk/; revision=5552
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog11
-rw-r--r--camel/providers/imap/camel-imap-folder.c6
-rw-r--r--camel/providers/imap/camel-imap-folder.h2
-rw-r--r--camel/providers/imap/camel-imap-store.c10
4 files changed, 18 insertions, 11 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 729ee8d496..c744399186 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,14 @@
+2000-09-22 Dan Winship <danw@helixcode.com>
+
+ * providers/imap/camel-imap-folder.c
+ (imap_get_subfolder_info_internal): The root folder's name is "",
+ not the namespace.
+ (camel_imap_folder_new): constify folder_name.
+
+ * providers/imap/camel-imap-store.c (get_folder): Create the
+ folder with folder_name, not folder_path.
+ (camel_imap_command_preliminary): Don't free cmdid here.
+
2000-09-21 Dan Winship <danw@helixcode.com>
* providers/imap/camel-imap-utils.c (imap_create_flag_list): New
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 539b906ba6..7d744d701d 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -185,10 +185,10 @@ camel_imap_folder_get_type (void)
}
CamelFolder *
-camel_imap_folder_new (CamelStore *parent, char *folder_name)
+camel_imap_folder_new (CamelStore *parent, const char *folder_name)
{
CamelFolder *folder = CAMEL_FOLDER (camel_object_new (camel_imap_folder_get_type ()));
- char *dir_sep, *short_name;
+ const char *dir_sep, *short_name;
dir_sep = CAMEL_IMAP_STORE (parent)->dir_sep;
short_name = strrchr (folder_name, *dir_sep);
@@ -571,7 +571,7 @@ imap_get_subfolder_info_internal (CamelFolder *folder, CamelException *ex)
}
}
- if (!strcmp (folder->name, namespace) && !found_inbox) {
+ if (!*folder->name && !found_inbox) {
fi = g_new0 (CamelFolderInfo, 1);
fi->full_name = g_strdup ("INBOX");
fi->name = g_strdup ("INBOX");
diff --git a/camel/providers/imap/camel-imap-folder.h b/camel/providers/imap/camel-imap-folder.h
index 3dc10b3682..2589ab4d50 100644
--- a/camel/providers/imap/camel-imap-folder.h
+++ b/camel/providers/imap/camel-imap-folder.h
@@ -62,7 +62,7 @@ typedef struct {
/* public methods */
-CamelFolder *camel_imap_folder_new (CamelStore *parent, char *folder_name);
+CamelFolder *camel_imap_folder_new (CamelStore *parent, const char *folder_name);
void camel_imap_folder_changed (CamelFolder *folder, gint recent, GPtrArray *expunged,
CamelException *ex);
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index a55de84dda..853059b618 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -389,16 +389,15 @@ get_folder (CamelStore *store, const char *folder_name, gboolean create, CamelEx
gboolean exists = FALSE;
gboolean selectable;
- folder_path = camel_imap_store_folder_path (imap_store, folder_name);
- new_folder = camel_imap_folder_new (store, folder_path);
+ new_folder = camel_imap_folder_new (store, folder_name);
/* this is the top-level dir, we already know it exists - it has to! */
if (!*folder_name) {
- g_free (folder_path);
camel_folder_refresh_info (new_folder, ex);
return new_folder;
}
+ folder_path = camel_imap_store_folder_path (imap_store, folder_name);
if (imap_folder_exists (imap_store, folder_path, &selectable, ex)) {
exists = TRUE;
if (!selectable)
@@ -1034,13 +1033,10 @@ camel_imap_command_preliminary (CamelImapStore *store, char **cmdid, CamelExcept
return CAMEL_IMAP_FAIL;
/* Check for '+' which indicates server is ready for command continuation */
- if (*respbuf == '+') {
- g_free (cmdid);
+ if (*respbuf == '+')
return CAMEL_IMAP_PLUS;
- }
status = camel_imap_status (*cmdid, respbuf);
- g_free (cmdid);
if (respbuf) {
/* get error response and set exception accordingly */