evolution-data-server r9370 - trunk/camel
- From: sragavan svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r9370 - trunk/camel
- Date: Mon, 18 Aug 2008 05:03:17 +0000 (UTC)
Author: sragavan
Date: Mon Aug 18 05:03:17 2008
New Revision: 9370
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9370&view=rev
Log:
2008-08-18 Srinivasa Ragavan <sragavan novell com>
* camel/camel-folder-summary.c: Even the summary header could be
dirty. Make a provision for saving just the header info.
Modified:
trunk/camel/ChangeLog
trunk/camel/camel-folder-summary.c
Modified: trunk/camel/camel-folder-summary.c
==============================================================================
--- trunk/camel/camel-folder-summary.c (original)
+++ trunk/camel/camel-folder-summary.c Mon Aug 18 05:03:17 2008
@@ -1317,22 +1317,22 @@
s->flags &= ~CAMEL_SUMMARY_DIRTY;
- count= cfs_count_dirty(s);
+ count = cfs_count_dirty(s);
printf("Saving %d/%d dirty records of %s\n", count, g_hash_table_size (s->loaded_infos), s->folder->full_name);
- if (!count)
- return 0;
- camel_db_begin_transaction (cdb, ex);
+ if (count) {
+ camel_db_begin_transaction (cdb, ex);
- ret = save_message_infos_to_db (s, ex);
+ ret = save_message_infos_to_db (s, ex);
+ if (ret != 0) {
+ camel_db_abort_transaction (cdb, ex);
+ /* Failed, so lets reset the flag */
+ s->flags |= CAMEL_SUMMARY_DIRTY;
+ return -1;
+ }
- if (ret != 0) {
- camel_db_abort_transaction (cdb, ex);
- /* Failed, so lets reset the flag */
- s->flags |= CAMEL_SUMMARY_DIRTY;
- return -1;
+ camel_db_end_transaction (cdb, ex);
}
- camel_db_end_transaction (cdb, ex);
record = (((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->summary_header_to_db (s, ex));
if (!record) {
@@ -2474,7 +2474,7 @@
s->junk_count = record->junk_count;
s->visible_count = record->visible_count;
s->junk_not_deleted_count = record->jnd_count;
-
+
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]