aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap/camel-imap-store.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/providers/imap/camel-imap-store.c')
-rw-r--r--camel/providers/imap/camel-imap-store.c9
1 files changed, 9 insertions, 0 deletions
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;