hal: Branch 'hal-0_5_9-branch'

David Zeuthen david at kemper.freedesktop.org
Wed May 23 10:29:11 PDT 2007


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

New commits:
diff-tree 2a4e25180442203ab1c7bd4fc64846d48f3c8b65 (from 51c47c02903a6847b2a2c1ed83cd7d5b50288236)
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 fd4514e..fafbd89 100644
--- a/hald/hald_runner.c
+++ b/hald/hald_runner.c
@@ -726,6 +726,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