From e567bc692a7d6da7cb793fcb1cbd47ef64ae3455 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Wed, 1 Aug 2001 07:13:05 +0000 Subject: Removed thrash checking code here since thrashing shouldn't happen now 2001-08-01 Christopher James Lahey * backend/ebook/e-book-view-listener.c (e_book_view_listener_check_queue): Removed thrash checking code here since thrashing shouldn't happen now that we've cleaned this up some. * backend/ebook/e-book.c (e_book_do_response_get_view): Properly handle cases where construction fails. svn path=/trunk/; revision=11539 --- addressbook/backend/ebook/e-book-view-listener.c | 29 ++++-------------------- 1 file changed, 4 insertions(+), 25 deletions(-) (limited to 'addressbook/backend/ebook/e-book-view-listener.c') diff --git a/addressbook/backend/ebook/e-book-view-listener.c b/addressbook/backend/ebook/e-book-view-listener.c index 705cc155c8..7e0f6d5c29 100644 --- a/addressbook/backend/ebook/e-book-view-listener.c +++ b/addressbook/backend/ebook/e-book-view-listener.c @@ -32,48 +32,27 @@ struct _EBookViewListenerPrivate { guint stopped : 1; }; +/* Only release our listener reference when the idle is finished. */ static gboolean e_book_view_listener_check_queue (EBookViewListener *listener) { - static gint thrash = 0; - gint queue_len; - if (listener->priv->stopped) { listener->priv->idle_id = 0; - return TRUE; + bonobo_object_unref (BONOBO_OBJECT (listener)); + return FALSE; } - queue_len = g_list_length (listener->priv->response_queue); - - bonobo_object_ref (BONOBO_OBJECT (listener)); if (listener->priv->response_queue != NULL) { gtk_signal_emit (GTK_OBJECT (listener), e_book_view_listener_signals [RESPONSES_QUEUED]); } - /* This means we didn't make any progress in dealing with what is on our - response queue. */ - if (queue_len == g_list_length (listener->priv->response_queue)) - ++thrash; - else - thrash = 0; - - if (thrash > 20 || listener->priv->response_queue == NULL) { - - if (thrash > 20) { - g_error ("e_book_view_listener_check_queue thrashing!"); - thrash = 0; - } - + if (listener->priv->response_queue == NULL) { listener->priv->idle_id = 0; - - /* Only release our listener reference when the idle is finished. */ bonobo_object_unref (BONOBO_OBJECT (listener)); - return FALSE; } - return TRUE; } -- cgit v1.2.3