[PATCH] Re: HAL Crasher

David Zeuthen david at fubar.dk
Mon Mar 19 17:09:02 PDT 2007


On Thu, 2007-03-15 at 22:07 +0100, Danny Kukawka wrote:
> On Donnerstag, 15. März 2007, Andrey Borzenkov wrote:
> > How is it related to D-Bus? Getting D-Bus-categorized errors from callouts on 
> > stderr is HAL convention. There is nothing inherent to D-Bus.
> 
> You are right, I spuriously assumed the dbus_message_new_error() call would kill 
> HAL because we had such problems in the past with other functions.
> 
> Attached a patch to validate the error name and workaround the problem in HAL.
> Because there is no funtion in the D-Bus libraries to check if a interface or
> error name is valid, I adapted the D-Bus internal funtion for util.h. If the 
> check fail and the error name is not valid the patch set the error name to:
> 
> 	org.freedesktop.Hal.Device.UnknownError
> 
> The invalid error name get prepend to the error message to avoid lost information.

Nice. I've committed this and also this patch on top

 http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=ca868fc31b6bad489b34cf6c66f023db94909f4d;hp=f038b39e6eddb393c6793b3932eb978346fa528b

to remove dead code / ensure that the exp_detail we're freeing really is
allocated by us.

     David




More information about the hal mailing list