evolution-data-server r8713 - in trunk/addressbook: . backends/groupwise libedata-book
- From: abharath svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r8713 - in trunk/addressbook: . backends/groupwise libedata-book
- Date: Wed, 30 Apr 2008 08:51:09 +0100 (BST)
Author: abharath
Date: Wed Apr 30 07:51:08 2008
New Revision: 8713
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=8713&view=rev
Log:
Committing on behalf of Chenthill Palanisamy <pchenthill novell com>
2008-04-30 Chenthill Palanisamy <pchenthill novell com>
** Fixes part of #350143 (bnc)
Severe memory leak in evolution-data-server
Modified:
trunk/addressbook/ChangeLog
trunk/addressbook/backends/groupwise/e-book-backend-groupwise.c
trunk/addressbook/libedata-book/e-book-backend-summary.c
Modified: trunk/addressbook/backends/groupwise/e-book-backend-groupwise.c
==============================================================================
--- trunk/addressbook/backends/groupwise/e-book-backend-groupwise.c (original)
+++ trunk/addressbook/backends/groupwise/e-book-backend-groupwise.c Wed Apr 30 07:51:08 2008
@@ -2693,6 +2693,9 @@
printf("e_gw_connection_read_cursor took %ld.%03ld seconds for %d contacts\n", diff / 1000, diff % 1000, CURSOR_ITEM_LIMIT);
}
+ if (status != E_GW_CONNECTION_STATUS_OK)
+ break;
+
for (l = gw_items; l != NULL; l = g_list_next (l)) {
contact_num++;
@@ -2832,12 +2835,6 @@
tm = gmtime (&mod_time);
strftime (cache_time_string, 100, "%Y-%m-%dT%H:%M:%SZ", tm);
- if (e_book_backend_summary_load (ebgw->priv->summary) == FALSE ||
- e_book_backend_summary_is_up_to_date (ebgw->priv->summary, mod_time) == FALSE) {
- /* build summary */
- build_summary (ebgw);
- }
-
filter = e_gw_filter_new ();
e_gw_filter_add_filter_component (filter, E_GW_FILTER_OP_GREATERTHAN,
"modified", cache_time_string);
@@ -3001,11 +2998,6 @@
g_stat (cache_file_name, &buf);
g_free (cache_file_name);
mod_time = buf.st_mtime;
- if (e_book_backend_summary_load (ebgw->priv->summary) == FALSE ||
- e_book_backend_summary_is_up_to_date (ebgw->priv->summary, mod_time) == FALSE) {
- /* build summary */
- build_summary (ebgw);
- }
if (cache_last_sequence != server_last_sequence) {
@@ -3332,6 +3324,13 @@
if (e_book_backend_db_cache_is_populated (ebgw->priv->file_db)) {
if (enable_debug)
printf("cache is populated\n");
+
+ if (!e_book_backend_summary_load (priv->summary))
+ build_summary (ebgw);
+
+ ebgw->priv->is_cache_ready = TRUE;
+ ebgw->priv->is_summary_ready = TRUE;
+
if (priv->is_writable){
if (enable_debug) {
printf("is writable\n");
Modified: trunk/addressbook/libedata-book/e-book-backend-summary.c
==============================================================================
--- trunk/addressbook/libedata-book/e-book-backend-summary.c (original)
+++ trunk/addressbook/libedata-book/e-book-backend-summary.c Wed Apr 30 07:51:08 2008
@@ -771,6 +771,10 @@
return;
}
+ /* Ensure the duplicate contacts are not added */
+ if (e_book_backend_summary_check_contact (summary, id))
+ e_book_backend_summary_remove_contact (summary, id);
+
new_item = g_new0 (EBookBackendSummaryItem, 1);
new_item->id = id;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]