aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-07-18 08:02:59 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-07-18 08:02:59 +0800
commit833a1ea41d8a468c4d26c5419f2147e7acc59fa5 (patch)
tree4098c0fa110feec457852769e8d3eba9b843470e /camel
parent86ec303a21211ab79c4e7a0c160e59b5605bfe15 (diff)
downloadgsoc2013-evolution-833a1ea41d8a468c4d26c5419f2147e7acc59fa5.tar.gz
gsoc2013-evolution-833a1ea41d8a468c4d26c5419f2147e7acc59fa5.tar.zst
gsoc2013-evolution-833a1ea41d8a468c4d26c5419f2147e7acc59fa5.zip
Send a "LOGOUT" command.
2000-07-17 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-store.c (imap_disconnect): Send a "LOGOUT" command. * providers/imap/camel-imap-folder.c (imap_get_message): Hacks to get IMAP code to work with CommunigatePro and MS Exchange (and any other servers that send back a UID at the end of each FETCH inside of the main body of the message part). (imap_sync): Un-#if 0 the code that sets the flags on the IMAP server for messages that have changed. Oops, don't mask with DELETED to find out if the message has been answered ;-) (imap_expunge): sync before expunging. svn path=/trunk/; revision=4207
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog4
-rw-r--r--camel/providers/imap/camel-imap-folder.c12
-rw-r--r--camel/providers/imap/camel-imap-store.c9
3 files changed, 21 insertions, 4 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 14cfedd432..9eac51632f 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,8 @@
2000-07-17 Jeffrey Stedfast <fejj@helixcode.com>
+ * providers/imap/camel-imap-store.c (imap_disconnect): Send a "LOGOUT"
+ command.
+
* providers/imap/camel-imap-folder.c (imap_get_message): Hacks to get
IMAP code to work with CommunigatePro and MS Exchange (and any other
servers that send back a UID at the end of each FETCH inside of the main
@@ -7,6 +10,7 @@
(imap_sync): Un-#if 0 the code that sets the flags on the IMAP server
for messages that have changed. Oops, don't mask with DELETED to find out
if the message has been answered ;-)
+ (imap_expunge): sync before expunging.
2000-07-16 Jeffrey Stedfast <fejj@helixcode.com>
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index c04fbb38f9..e140d9002f 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -288,6 +288,11 @@ imap_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
gint i, max;
+ if (expunge) {
+ imap_expunge (folder, ex);
+ return;
+ }
+
/* Set the flags on any messages that have changed this session */
if (imap_folder->summary) {
max = imap_folder->summary->len;
@@ -331,9 +336,6 @@ imap_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
}
}
}
-
- if (expunge)
- imap_expunge (folder, ex);
}
static void
@@ -343,6 +345,8 @@ imap_expunge (CamelFolder *folder, CamelException *ex)
gint status;
g_return_if_fail (folder != NULL);
+
+ imap_sync (folder, FALSE, ex);
status = camel_imap_command_extended (CAMEL_IMAP_STORE (folder->parent_store), folder,
&result, "EXPUNGE");
@@ -528,7 +532,7 @@ imap_append_message (CamelFolder *folder, CamelMimeMessage *message, guint32 fla
*(flagstr + strlen (flagstr) - 1) = ')';
}
- /* FIXME: len isn't really correct I don't think, we need to filter and possibly other things */
+ /* FIXME: len isn't really correct I don't think, we need to crlf/dot filter */
status = camel_imap_command_extended (CAMEL_IMAP_STORE (folder->parent_store),
folder, &result, "APPEND %s%s {%d}\r\n%s",
folder_path, flagstr ? flagstr : "",
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index c03ae182cf..c9e70731a3 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -418,10 +418,19 @@ static gboolean
imap_disconnect (CamelService *service, CamelException *ex)
{
CamelImapStore *store = CAMEL_IMAP_STORE (service);
+ char *result;
+ int status;
if (!service->connected)
return TRUE;
+ /* send the logout command */
+ status = camel_imap_command_extended (CAMEL_IMAP_STORE (service), NULL, &result, "LOGOUT");
+ if (status != CAMEL_IMAP_OK) {
+ /* Oh fuck it, we're disconnecting anyway... */
+ }
+ g_free (result);
+
if (!service_class->disconnect (service, ex))
return FALSE;