hal: Branch 'master'

David Zeuthen david at kemper.freedesktop.org
Tue Mar 20 13:37:33 PDT 2007


 hald/hald_dbus.c |    7 +++++++
 1 files changed, 7 insertions(+)

New commits:
diff-tree a48af028e1e48dcd89740153a3da2bfebbec0867 (from f10aff4fe085ac9f07dd053e2067dde3b1fcdcca)
Author: Frederic Crozat <fcrozat at mandriva.com>
Date:   Tue Mar 20 16:37:31 2007 -0400

    handle system bus restarts
    
    the following patch is preventing hald to exit when system bus is
    restarted (I won't troll^W comment on whether it should survive or not),
    just like previous release of hal.
    
    As a side note, I've noticed upstream dbus (as well as Fedora package)
    is shipping with fatal_warning_on_check (I'll let interested people to
    refer to flamewa^Wdiscussion about that last november on dbus mailing
    list), in the hope of getting dbus based applications to fix their
    incorrect usage of dbus API, which is why we are seeing hald exiting a
    lot. Debian / Ubuntu (as now Mandriva) are shipping with those checks
    disabled, so this might explain why not everybody sees hald exiting more
    than it should.

diff --git a/hald/hald_dbus.c b/hald/hald_dbus.c
index 17b7f14..95001d2 100644
--- a/hald/hald_dbus.c
+++ b/hald/hald_dbus.c
@@ -2526,6 +2526,8 @@ static gboolean
 reinit_dbus (gpointer user_data)
 {
 	HAL_INFO (("entering!"));
+	if (dbus_connection == NULL) 
+		hald_dbus_init_preprobe ();
 	if (hald_dbus_init ())
 		return FALSE;
 	else
@@ -4763,6 +4765,11 @@ hald_dbus_init (void)
 
 	HAL_INFO (("entering"));
 
+	if (dbus_connection == NULL) {
+		HAL_ERROR(("not connected to system bus"));
+		return FALSE;
+	}
+
 	dbus_error_init (&dbus_error);
 	dbus_bus_request_name (dbus_connection, "org.freedesktop.Hal", 0, &dbus_error);
 	if (dbus_error_is_set (&dbus_error)) {


More information about the hal-commit mailing list