aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog12
-rw-r--r--addressbook/backend/pas/pas-book.c14
2 files changed, 24 insertions, 2 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index c1d0373ebe..b1a5153233 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,14 @@
+2001-10-27 Jon Trowbridge <trow@gnu.org>
+
+ * backend/pas/pas-book.c (pas_book_check_queue): That should be a
+ bonobo_object_unref, not a gtk_object_unref.
+ (pas_book_queue_request): Likewise, we need to bonobo_object_ref
+ here.
+ (pas_book_destroy): If our pas_book_check_queue timeout is still
+ active, disable it. This should never happen, but it never hurts
+ to be careful.
+ (pas_book_destroy): Set book->priv to NULL after we free it.
+
2001-10-27 JP Rosevear <jpr@ximian.com>
* conduit/address-conduit.c (local_record_from_ecard): copy phone
@@ -13,6 +24,7 @@
(card_removed): don't touch on lookup
(match): touch on lookup
+>>>>>>> 1.878
2001-10-27 Jon Trowbridge <trow@ximian.com>
* backend/pas/pas-book.c (pas_book_check_queue): Added paranoid
diff --git a/addressbook/backend/pas/pas-book.c b/addressbook/backend/pas/pas-book.c
index e67ae51842..d51d182dad 100644
--- a/addressbook/backend/pas/pas-book.c
+++ b/addressbook/backend/pas/pas-book.c
@@ -46,7 +46,7 @@ pas_book_check_queue (PASBook *book)
if (book->priv->request_queue == NULL) {
book->priv->timeout_id = 0;
book->priv->timeout_lock = FALSE;
- gtk_object_unref (GTK_OBJECT (book));
+ bonobo_object_unref (BONOBO_OBJECT (book));
return FALSE;
}
@@ -62,7 +62,7 @@ pas_book_queue_request (PASBook *book, PASRequest *req)
g_list_append (book->priv->request_queue, req);
if (book->priv->timeout_id == 0) {
- gtk_object_ref (GTK_OBJECT (book));
+ bonobo_object_ref (BONOBO_OBJECT (book));
book->priv->timeout_id = g_timeout_add (20, (GSourceFunc) pas_book_check_queue, book);
}
}
@@ -780,6 +780,15 @@ pas_book_destroy (GtkObject *object)
}
g_list_free (book->priv->request_queue);
+ /* We should never ever have timeout_id == 0 when we get destroyed, unless there
+ is some sort of reference counting bug. Still, we do this to try to avoid
+ horrible crashes in those situations. */
+ if (book->priv->timeout_id) {
+ g_warning ("PASBook destroyed with non-zero timeout_id. This shouldn't happen.");
+ g_source_remove (book->priv->timeout_id);
+ book->priv->timeout_id = 0;
+ }
+
CORBA_exception_init (&ev);
CORBA_Object_release (book->priv->listener, &ev);
@@ -789,6 +798,7 @@ pas_book_destroy (GtkObject *object)
CORBA_exception_free (&ev);
g_free (book->priv);
+ book->priv = NULL;
GTK_OBJECT_CLASS (pas_book_parent_class)->destroy (object);
}