[PATCH] do not call _dbus_warn_check_failed on checks

Timo Hoenig thoenig at suse.de
Mon Nov 13 02:09:16 PST 2006


Hi,

Here we go, we definitely want that for D-Bus 1.0.1.

All checks in D-Bus are currently fatal.

Checks always lead to _dbus_abort as _dbus_return_if_fail and
_dbus_return_val_if_fail are calling _dbus_warn_check_failed.

This was introduced after the addition of _dbus_warn_check_failed [1].

There is a misleading comment (line 152, "!DBUS_DISABLE_ASSERT") which
is wrong and might have lead to the change.  The comment should read "!
DBUS_DISABLE_CHECKS".

The attached patch makes both _dbus_return_if_fail and
_dbus_return_val_if_fail call _dbus_warn rather than
_dbus_warn_check_failed.  It also fixes the misleading comment.

Thanks,

   Timo

[1] dbus-internal.h rev 1.62
    http://webcvs.freedesktop.org/dbus/dbus/dbus/dbus-internals.h?r1=1.61&r2=1.62&view=patch

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbus-do-not-abort-on-check-thoenig-01.patch
Type: text/x-patch
Size: 2831 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20061113/a7c437d6/dbus-do-not-abort-on-check-thoenig-01.bin


More information about the dbus mailing list