libhal error argument

Artem Kachitchkine Artem.Kachitchkin at Sun.COM
Tue Apr 10 14:05:15 PDT 2007


Trying to clarify libhal semantics... For some functions, callers can supply a 
pointer to an initialized dbus error object for returning errors. When such 
functions fail for reasons unrelated to DBus, is it allowed for libhal to not 
set the error? Which means, callers that pass non-NULL error arg, must always 
use dbus_error_is_set()?

To illustrate, from gnome-vfs-hal-mounts.c, is there a bug here:

	if (!libhal_ctx_init (volume_monitor_daemon->hal_ctx, &error)) {
		g_warning ("libhal_ctx_init failed: %s\n", error.message);
		dbus_error_free (&error);
		return FALSE;
	}

-Artem.



More information about the hal mailing list