[PATCH] fix usage of dbus_error_is_set in libhal

David Zeuthen david at fubar.dk
Thu Nov 9 13:45:56 PST 2006


On Tue, 2006-11-07 at 11:36 -0500, John (J5) Palmieri wrote:
> On Tue, 2006-11-07 at 00:18 +0100, Danny Kukawka wrote:
> > Hi,
> > 
> > this patch fixes the usage of dbus_error_is_set(error) if the error is NULL. 
> > Added check to be sure the lib don't call dbus_error_is_set() if the error is 
> > NULL, otherwise the call crash.
> > 
> > Cheers,
> > 
> > Danny
> > 
> >  libhal.c | 40 ++++++++++++++++++++--------------------
> >  1 file changed, 20 insertions(+), 20 deletions(-)

Looks good to me, thanks.

> While accepting NULL for an error argument is acceptable for user code I
> personally think it is pretty wrong for internal modules to be ignoring
> the specific errors returned.  At the least they should log them.  This
> patch sort of peppers over the issues in a pretty important system
> daemon.

I of course agree with you but the patch is for libhal (and I'm not
happy about how I designed libhal in the first place but that was before
any D-Bus bindings existed).

As such the errors will crop up in applications. They shouldn't be using
libhal anyway but that is going to take some time before that is fixed
(and that includes stable releases of D-Bus bindings).

At some point I want to switch over to making the system daemon (hald)
use the glib bindings but the glib bindings needs a few features here
and there before that can happen. Have already raised this with Rob
Taylor and it seems fixable.

     David




More information about the hal mailing list