hal: Branch 'master'

Richard Hughes hughsient at kemper.freedesktop.org
Tue Mar 13 14:34:42 PDT 2007


 hald/linux/addons/addon-acpi.c |    2 ++
 1 files changed, 2 insertions(+)

New commits:
diff-tree 96913a4c7a7f29de904d151d1d3487de0bdd9f7c (from 37e9138258bcd891308cf8d56c1c1cbb553ddb77)
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Mar 13 21:34:21 2007 +0000

    Fix error initialisation in acpi addon to fix ac adapter event reporting
    
    Using HAL master I do not get AC adapter events anymore. Debugging this I found:
    
    [15262]: 21:04:42.717 [D] addon-acpi.c:105: event is 'ac_adapter ACAD 00000080 00000000'
    [15262]: 21:04:42.717 [D] addon-acpi.c:133: ac_adapter event
    This is normally a bug in some application using the D-Bus library.
      D-Bus not built with -rdynamic so unable to print a backtrace
    
    Attaching to the hald-addon-acpi process, and running /usr/sbin/hald:
    
    #0  0x00406402 in __kernel_vsyscall ()
    #1  0x006fbf60 in raise () from /lib/libc.so.6
    #2  0x006fd7b1 in abort () from /lib/libc.so.6
    #3  0x02df8f55 in ?? () from /lib/libdbus-1.so.3
    #4  0x02df4ee6 in ?? () from /lib/libdbus-1.so.3
    #5  0x02dde6e8 in dbus_connection_send_with_reply_and_block () from /lib/libdbus-1.so.3
    #6  0x00f0d5bd in libhal_device_rescan () from /usr/lib/libhal.so.1
    #7  0x08049082 in ?? ()
    #8  0x08049234 in ?? ()
    #9  0x006e8ec0 in __libc_start_main () from /lib/libc.so.6
    #10 0x08048d31 in ?? ()
    
    This fixes up the error initialisation, and fixes the issue for me.
    
    Richard.

diff --git a/hald/linux/addons/addon-acpi.c b/hald/linux/addons/addon-acpi.c
index a18bc9f..f0561ca 100644
--- a/hald/linux/addons/addon-acpi.c
+++ b/hald/linux/addons/addon-acpi.c
@@ -131,9 +131,11 @@ main_loop (LibHalContext *ctx, FILE *eve
 				}
 			} else if (strncmp (acpi_path, "ac_adapter", sizeof ("ac_adapter") - 1) == 0) {
 				HAL_DEBUG (("ac_adapter event"));
+				dbus_error_init (&error);
 				libhal_device_rescan (ctx, udi, &error);
 			} else if (strncmp (acpi_path, "battery", sizeof ("battery") - 1) == 0) {
 				HAL_DEBUG (("battery event"));
+				dbus_error_init (&error);
 				libhal_device_rescan (ctx, udi, &error);
 			}
 


More information about the hal-commit mailing list