aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog9
-rw-r--r--camel/providers/imap/camel-imap-folder.c2
-rw-r--r--camel/providers/imap/camel-imap-store.c35
3 files changed, 39 insertions, 7 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 693a9cd7fa..d0b26d44a4 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,10 +1,17 @@
2000-06-20 Jeffrey Stedfast <fejj@helixcode.com>
+ * providers/imap/camel-imap-store.c (camel_imap_command_extended):
+ Now returns the last line of data that the server sends back as
+ well. This is needed for commands like SELECT (like Peter pointed
+ out).
+ (camel_imap_command): No longer checks for SELECT (no need)
+
* providers/imap/camel-imap-folder.c: Added namespace stuff
which we will need later on...
(imap_parse_subfolder_line): Convenience function for use in
get_subfolder_names()
- (imap_get_subfolder_names): Updated.
+ (imap_get_subfolder_names): Updated. Also changed it to use LIST
+ instead of LSUB (temporary change).
2000-06-19 Jeffrey Stedfast <fejj@helixcode.com>
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 729a620820..0d67c2fa7f 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -282,6 +282,8 @@ imap_init (CamelFolder *folder, CamelStore *parent_store, CamelFolder *parent_fo
folder->full_name, service->url->host,
status == CAMEL_IMAP_ERR ? result :
"Unknown error");
+ } else {
+ /* parse the mode we opened it in */
}
g_free (result);
}
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index 76af3348e1..cf0789de93 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -331,10 +331,10 @@ imap_create (CamelFolder *folder, CamelException *ex)
return FALSE;
}
- if (!strcmp(folder->full_name, "INBOX"))
+ if (!strcmp (folder->full_name, "INBOX"))
return TRUE;
- if (camel_folder_get_subfolder(folder->parent_folder, folder->name, FALSE, ex))
+ if (camel_folder_get_subfolder (folder->parent_folder, folder->name, FALSE, ex))
return TRUE;
/* create the directory for the subfolder */
@@ -352,7 +352,7 @@ imap_create (CamelFolder *folder, CamelException *ex)
return FALSE;
}
- g_free(result);
+ g_free (result);
return TRUE;
}
@@ -423,8 +423,8 @@ camel_imap_command (CamelImapStore *store, CamelFolder *folder, char **ret, char
va_list ap;
gint status = CAMEL_IMAP_OK;
- if (folder && store->current_folder != folder && strncmp (fmt, "SELECT", 6) &&
- strncmp (fmt, "STATUS", 6) && strncmp (fmt, "CREATE", 5) && strcmp (fmt, "CAPABILITY")) {
+ if (folder && store->current_folder != folder && strncmp (fmt, "STATUS", 6) &&
+ strncmp (fmt, "CREATE", 5) && strcmp (fmt, "CAPABILITY")) {
/* We need to select the correct mailbox first */
char *r;
int s;
@@ -433,6 +433,24 @@ camel_imap_command (CamelImapStore *store, CamelFolder *folder, char **ret, char
if (s != CAMEL_IMAP_OK) {
*ret = r;
return s;
+ } else {
+ /* parse the read-write mode */
+#if 0
+ char *p;
+
+ p = strstr (result, "\n");
+ while (p) {
+ if (*(p + 1) == '*')
+ p = strstr (p, "\n");
+ else
+ break;
+ }
+
+ if (p) {
+ if (strstrcase (p, "READ-WRITE"))
+ mode =
+ }
+#endif
}
store->current_folder = folder;
@@ -565,7 +583,12 @@ camel_imap_command_extended (CamelImapStore *store, CamelFolder *folder, char **
g_ptr_array_add (data, respbuf);
}
- status = camel_imap_status (cmdid, respbuf);
+ if (respbuf) {
+ g_ptr_array_add (data, respbuf);
+ status = camel_imap_status (cmdid, respbuf);
+ } else {
+ status = CAMEL_IMAP_FAIL;
+ }
g_free (cmdid);
if (status == CAMEL_IMAP_OK) {