[evolution] Sync to disk the outbox, since if we crash,	we endup sending mail again.
- From: Srinivasa Ragavan <sragavan src gnome org>
- To: svn-commits-list gnome org
- Cc: 
- Subject: [evolution] Sync to disk the outbox, since if we crash,	we endup sending mail again.
- Date: Wed,  4 Nov 2009 16:13:38 +0000 (UTC)
commit b958de6faac3361452395a275ccf813365c29da7
Author: Srinivasa Ragavan <sragavan gnome org>
Date:   Wed Nov 4 14:27:20 2009 +0000
    Sync to disk the outbox, since if we crash, we endup sending mail again.
 mail/mail-ops.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 27b5ef8..cc45b42 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -630,8 +630,11 @@ mail_send_message (struct _send_queue_msg *m, CamelFolder *queue, const gchar *u
 			}
 		}
 	}
-	if (!camel_exception_is_set(ex))
+	if (!camel_exception_is_set(ex)) {
 		camel_folder_set_message_flags (queue, uid, CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_SEEN, ~0);
+		/* Sync it to disk, since if it crashes in between, we keep sending it again on next start. */
+		camel_folder_sync (queue, FALSE);
+	}
 
 	if (err->len) {
 		/* set the culmulative exception report */
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]