hal: Branch 'master'

David Zeuthen david at kemper.freedesktop.org
Mon Mar 26 22:35:48 PDT 2007


 examples/interface-locking-test.py |    9 ++++++++-
 hald/hald_dbus.c                   |    2 +-
 2 files changed, 9 insertions(+), 2 deletions(-)

New commits:
diff-tree 583de1e89c8043180814921c860f85c4cd9ed58b (from 6c4e1b748beba80a564262c9b877803833b851aa)
Author: David Zeuthen <davidz at redhat.com>
Date:   Tue Mar 27 01:35:49 2007 -0400

    fix up ReleaseGlobalInterfaceLock() and improve locking example

diff --git a/examples/interface-locking-test.py b/examples/interface-locking-test.py
index a31a4be..3b98cd1 100755
--- a/examples/interface-locking-test.py
+++ b/examples/interface-locking-test.py
@@ -12,7 +12,14 @@ manager = dbus.Interface(bus.get_object(
                                          "/org/freedesktop/Hal/Manager"),
                           "org.freedesktop.Hal.Manager")
 
+# replace this with a volume on your system
+device = dbus.Interface(bus.get_object("org.freedesktop.Hal",
+                                         "/org/freedesktop/Hal/devices/volume_uuid_2232_1F11"),
+                          "org.freedesktop.Hal.Device")
+
 manager.AcquireGlobalInterfaceLock("org.freedesktop.Hal.Device.Storage", True)
-time.sleep(10)
+#device.AcquireInterfaceLock("org.freedesktop.Hal.Device.Volume", True)
+time.sleep(2)
 manager.ReleaseGlobalInterfaceLock("org.freedesktop.Hal.Device.Storage")
+#device.ReleaseInterfaceLock("org.freedesktop.Hal.Device.Volume")
 
diff --git a/hald/hald_dbus.c b/hald/hald_dbus.c
index 8a6fdad..a1a2b66 100644
--- a/hald/hald_dbus.c
+++ b/hald/hald_dbus.c
@@ -2159,7 +2159,7 @@ device_release_global_interface_lock (DB
 	}
 
         lock_name = g_strdup_printf ("Global.%s", interface_name);
-        if (!hal_device_release_lock (d, interface_name, sender)) {
+        if (!hal_device_release_lock (d, lock_name, sender)) {
 		raise_interface_not_locked (connection, message, interface_name);
                 g_free (lock_name);
 		return DBUS_HANDLER_RESULT_HANDLED;


More information about the hal-commit mailing list