evolution-data-server r9060 - in branches/camel-db-summary/camel: . providers/local
- From: sragavan svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r9060 - in branches/camel-db-summary/camel: . providers/local
- Date: Fri, 27 Jun 2008 08:56:27 +0000 (UTC)
Author: sragavan
Date: Fri Jun 27 08:56:27 2008
New Revision: 9060
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9060&view=rev
Log:
Fix the summary creation for the first time.
Modified:
branches/camel-db-summary/camel/camel-folder-summary.c
branches/camel-db-summary/camel/providers/local/camel-local-folder.c
Modified: branches/camel-db-summary/camel/camel-folder-summary.c
==============================================================================
--- branches/camel-db-summary/camel/camel-folder-summary.c (original)
+++ branches/camel-db-summary/camel/camel-folder-summary.c Fri Jun 27 08:56:27 2008
@@ -740,7 +740,7 @@
ret = camel_db_read_message_info_records (cdb, folder_name, (gpointer**) &s, camel_read_mir_callback, NULL);
s->cache_load_time = time (NULL);
- return ret;
+ return ret == 0 ? 0 : -1;
}
@@ -767,7 +767,8 @@
s->cache_load_time = time (NULL);
#warning "LRU please and not timeouts"
g_timeout_add_seconds (SUMMARY_CACHE_DROP, remove_cache, s);
- return ret;
+
+ return ret == 0 ? 0 : -1;
}
static void
Modified: branches/camel-db-summary/camel/providers/local/camel-local-folder.c
==============================================================================
--- branches/camel-db-summary/camel/providers/local/camel-local-folder.c (original)
+++ branches/camel-db-summary/camel/providers/local/camel-local-folder.c Fri Jun 27 08:56:27 2008
@@ -289,6 +289,14 @@
folder->summary = (CamelFolderSummary *)CLOCALF_CLASS(lf)->create_summary(lf, lf->summary_path, lf->folder_path, lf->index);
if (camel_local_summary_load((CamelLocalSummary *)folder->summary, forceindex, NULL) == -1) {
/* ? */
+ if (camel_local_summary_check((CamelLocalSummary *)folder->summary, lf->changes, ex) == 0) {
+ /* we sync here so that any hard work setting up the folder isn't lost */
+ if (camel_local_summary_sync((CamelLocalSummary *)folder->summary, FALSE, lf->changes, ex) == -1) {
+ camel_object_unref (CAMEL_OBJECT (folder));
+ g_free(name);
+ return NULL;
+ }
+ }
}
/* We don't need to sync here ..., it can sync later on when it calls refresh info */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]