evolution-data-server r9722 - in trunk/addressbook: . libebook
- From: mcrha svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r9722 - in trunk/addressbook: . libebook
- Date: Mon, 3 Nov 2008 14:00:11 +0000 (UTC)
Author: mcrha
Date: Mon Nov 3 14:00:11 2008
New Revision: 9722
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9722&view=rev
Log:
2008-11-03 Milan Crha <mcrha redhat com>
** Fix for bug #532136
* libebook/e-book.c: (e_book_op_remove): Remove operation from idle
queue when still there in time of its removal.
* libebook/e-book.c: (kill_remaining_ops), (e_book_dispose):
Free pending operations in time of dispose properly.
Modified:
trunk/addressbook/ChangeLog
trunk/addressbook/libebook/e-book.c
Modified: trunk/addressbook/libebook/e-book.c
==============================================================================
--- trunk/addressbook/libebook/e-book.c (original)
+++ trunk/addressbook/libebook/e-book.c Mon Nov 3 14:00:11 2008
@@ -213,6 +213,13 @@
{
g_hash_table_remove (book->priv->id_to_op,
&op->opid);
+
+ if (op->idle_id && g_list_find (book->priv->pending_idles, GINT_TO_POINTER (op->idle_id))) {
+ book->priv->pending_idles = g_list_remove (book->priv->pending_idles,
+ GINT_TO_POINTER (op->idle_id));
+ g_source_remove (op->idle_id);
+ op->idle_id = 0;
+ }
}
static void
@@ -3953,6 +3960,18 @@
}
static void
+kill_remaining_ops (gpointer key, gpointer value, gpointer user_data)
+{
+ EBookOp *op = value;
+
+ if (!op)
+ return;
+
+ find_key_value (key, value, NULL);
+ e_book_clear_op (op->book, op);
+}
+
+static void
e_book_init (EBook *book)
{
book->priv = g_new0 (EBookPrivate, 1);
@@ -4006,8 +4025,10 @@
if (book->priv->source)
g_object_unref (book->priv->source);
- /* XXX free up the remaining ops? */
+ g_mutex_lock (book->priv->mutex);
+ g_hash_table_foreach (book->priv->id_to_op, kill_remaining_ops, NULL);
g_hash_table_destroy (book->priv->id_to_op);
+ g_mutex_unlock (book->priv->mutex);
g_mutex_free (book->priv->mutex);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]