hal: Branch 'master'

David Zeuthen david at kemper.freedesktop.org
Mon Jan 8 11:10:54 PST 2007


 tools/hal-storage-shared.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

New commits:
diff-tree 9d5b803c98a59266dbb3f13cec3a9d00d2f55693 (from ab61f8f2208163ccadc7e2d86cf7c561f77f874f)
Author: David Zeuthen <davidz at redhat.com>
Date:   Mon Jan 8 14:10:42 2007 -0500

    call dbus_error_free() directly to avoid spew on stderr
    
    This patch is based on this discussion:
    
    Subject: [PATCH] Replace LIBHAL_FREE_DBUS_ERROR with dbus_error_free() in handle_unmount()
    
    From: Andrey Borzenkov <arvidjaar at mail.ru>
    
    When somebody calls Unmount on ignored media, hald crashes with:
    
    19:00:32.166 [I] hald_dbus.c:2972: Refreshing mount state for
    /org/freedesktop/Hal/devices/volume_uuid_f340078d_4758_4d33_a4ac_a148c95c7558
    since Unmount() completed
    19:00:32.166 [I] hald_dbus.c:3027: failed with 'hal-storage-shared.c 285 :
    INFO: called LIBHAL_FREE_DBUS_ERROR but dbusError was not set.'
    'org.freedesktop.Hal.Device.Volume.PermissionDenied'
    process 4822: arguments to dbus_message_new_error() were incorrect,
    assertion "_dbus_check_is_valid_error_name (error_name)" failed in file
    dbus-message.c line 1207.
    This is normally a bug in some application using the D-Bus library.
    
    The patch is using dbus_error_free() directly instead
    
    Signed-off-by: Andrey Borzenkov <arvidjaar at mail.ru>

diff --git a/tools/hal-storage-shared.c b/tools/hal-storage-shared.c
index 63f831b..bdbd14d 100644
--- a/tools/hal-storage-shared.c
+++ b/tools/hal-storage-shared.c
@@ -291,7 +291,9 @@ handle_unmount (LibHalContext *hal_ctx, 
 		dbus_error_init (&error);
 		if (libhal_device_get_property_bool (hal_ctx, udi, "volume.ignore", &error) || 
 		    dbus_error_is_set (&error)) {
-			LIBHAL_FREE_DBUS_ERROR (&error);
+			if (dbus_error_is_set (&error)) {
+				dbus_error_free (&error);
+			}
 			permission_denied_volume_ignore (device);
 		}
 


More information about the hal-commit mailing list