Invalid assert on intefaces

John (J5) Palmieri johnp at redhat.com
Mon Apr 18 16:06:19 PDT 2005


In the function _dbus_header_create there is an assert line:

_dbus_assert ((interface && member) ||
                (error_name) ||
                !(interface || member || error_name));

that looks like it will not accept a NULL for the interface unless this
is an error or does not have a member.  According to the spec:

Optionally, the message has an INTERFACE field giving the interface the
method is a part of. In the absence of an INTERFACE field, if two
interfaces on the same object have a method with the same name, it is
undefined which of the two methods will be invoked. Implementations may
also choose to return an error in this ambiguous case. However, if a
method name is unique implementations must not require an interface
field.

It seems this assert and the spec contradict each other as interfaces
are only required by signals.  Attached is a patch that fixes this.

-- 
John (J5) Palmieri
Associate Software Engineer
Desktop Group
Red Hat, Inc.
Blog: http://martianrock.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbus-fix-assert.patch
Type: text/x-patch
Size: 511 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20050418/d01d6d28/dbus-fix-assert.bin


More information about the dbus mailing list