[PATCH] do not call _dbus_warn_check_failed on checks

Havoc Pennington hp at redhat.com
Wed Nov 15 09:55:06 PST 2006


Daniel Stone wrote:
> On Wed, Nov 15, 2006 at 02:11:59AM +0100, Kevin Krammer wrote:
>> The low level lib remains unchanged and Daniel gets its safe behavior. Every 
>> body is happy :)
> 
> Unfortunately this does mean the checks/errors/gash are maintained in
> two places, with the potential for desync.  But I'd certainly use
> something that isn't libdbus-1, but with no other external dependencies.
> 

If you implement it by setting the bug handler as in the new API I 
posted, then you don't have to maintain it in two places,
   MyResultCode my_wrapper(Foo *foo) {
     dbus_call(foo);
     if (bug_happened)
       return BUG_IN_MY_CODE;
     else
       return OK;
   }

In any case, since there's an API change to every function that doesn't 
already return a DBusError (which I believe is most of them), there 
would be two copies of the code anyway, even if all these new wrappers 
were in libdbus-1.so itself.

Havoc


More information about the dbus mailing list