hal/tools lshal.c,1.18,1.19

Danny Kukawka dkukawka at freedesktop.org
Mon Feb 13 06:35:33 PST 2006


Update of /cvs/hal/hal/tools
In directory gabe:/tmp/cvs-serv4810/tools

Modified Files:
	lshal.c 
Log Message:
2006-02-13  Danny Kukawka  <danny.kukawka at web.de>

        Fixed problems with usage of dbus_error within a for-block. Need
        to be sure that the error is empty and initialised for each usage.
        If not we get potentially error messages from dbus. :

        * hald/linux2/addons/addon-acpi.c: (main_loop):
        * tools/lshal.c: (dump_devices):



Index: lshal.c
===================================================================
RCS file: /cvs/hal/hal/tools/lshal.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- lshal.c	9 Jan 2006 13:08:08 -0000	1.18
+++ lshal.c	13 Feb 2006 14:35:31 -0000	1.19
@@ -262,6 +262,12 @@
 		devices[i].name = device_names[i];
 		devices[i].parent = libhal_device_get_property_string (hal_ctx,
 				device_names[i], "info.parent", &error);
+
+		if (dbus_error_is_set (&error)) {
+			/* Free the error (which include a dbus_error_init())
+			   This should prevent errors if a call above fails */
+			dbus_error_free (&error);
+		}
 	}
 
 	if (long_list) {




More information about the hal-commit mailing list