[Evolution-hackers] Workaround for 68533



I've been trying to ensure that evolution-data-server goes away when the
user's session ends, but have been running into this problem:
http://bugzilla.ximian.com/show_bug.cgi?id=68533

So it seems that the ECalBackends are never finalized, and so the
anniversaries backend keeps alive the EDataBook for the local contacts,
and hence e-d-s keeps itself alive.

Attached is a dubious workaround I've been trying.  On the assumption
that there will always be a leaked ECalBackend keeping an addressbook
alive, it allows e-d-s to quit when there are no calendars and a
_single_ addressbook around.  

Seems to work: I've tested on FC3, with various combinations of
running/not running Evolution and the panel clock, with various
calendars/addressbooks etc, and with evolution-alarm-notify.  e-d-s now
goes away sanely, but it's a fairly dubious hack.  

Thoughts?  Flames?

Dave
--- evolution-data-server-1.0.2/src/server.c.workaround-cal-backend-leak	2004-10-20 01:11:58.049726116 -0400
+++ evolution-data-server-1.0.2/src/server.c	2004-10-20 01:13:53.582289628 -0400
@@ -151,6 +151,13 @@
 		bonobo_main_quit ();
 	}
 
+	/* Workaround for http://bugzilla.ximian.com/show_bug.cgi?id=68533 */
+	if (e_data_cal_factory_get_n_backends (e_data_cal_factory) == 0 &&
+	    e_data_book_factory_get_n_backends (e_data_book_factory) == 1) {
+		g_message ("termination_handler(): Terminating the Server (with workaround for bug 68533).  Have a nice day.");
+		bonobo_main_quit ();
+	}
+
 	termination_handler_id = 0;
 	return FALSE;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]