hal: Branch 'master'

David Zeuthen david at kemper.freedesktop.org
Wed May 23 10:28:56 PDT 2007


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

New commits:
diff-tree 46f3e6001e5249acb287236a65887bb5dfebad97 (from 60331db08e98a61ced21273381ed076b4cc252f3)
Author: Doug Goldstein <cardoe at gentoo.org>
Date:   Wed May 23 13:28:59 2007 -0400

    the runner doesn't handle D-Bus disconnect properly
    
    It appears that if the connection to D-Bus is lost or some such is
    lost, HAL doesn't check the result of DBusPendingCall from
    dbus_connection_send_with_reply() [1] to see if the result is not NULL
    and as such an invalid case is being hit within the D-Bus API and
    we're hitting a D-Bus assert and causing a crash.
    
    Provided is a patch to see if it's NULL and handle it properly.

diff --git a/hald/hald_runner.c b/hald/hald_runner.c
index 8de2b70..8fd5884 100644
--- a/hald/hald_runner.c
+++ b/hald/hald_runner.c
@@ -771,6 +771,13 @@ hald_runner_run_method (HalDevice * devi
 					      msg, &call, INT_MAX))
 		DIE (("No memory"));
 
+	/**
+	 * The connection was disconnected as per D-Bus API
+	 * This is an error condition and should not really happen
+	 */
+	if (call == NULL)
+		goto error;
+
 	hd = g_new0 (HelperData, 1);
 	hd->d = device;
 	hd->cb = cb;


More information about the hal-commit mailing list