From 0fa46f68b8bbd2913ac9620328518fc5f9e16f85 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 16 Sep 2013 14:16:13 +0100 Subject: [PATCH] Do not require messages without INTERFACE to be dispatched Previously, if we have interfaces: interface com.example.foo: method Ambiguous() interface com.example.bar: method Ambiguous() method Unambiguous() implementations were required to deliver a message with no INTERFACE and METHOD=Unambiguous to "bar". A message with no INTERFACE and METHOD=Ambiguous could either be delivered to "foo", delivered to "bar" or treated as an error. Relax this to allow an error for the unambiguous case, too, and strongly recommend specifying the interface (which is best-practice). Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68597 Reviewed-by: Chengwei Yang Vaguely-acked-by: Thiago Macieira, David Zeuthen [and desrt objected that it didn't go far enough] Signed-off-by: Simon McVittie --- doc/dbus-specification.xml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/doc/dbus-specification.xml b/doc/dbus-specification.xml index 125001a..865a8bf 100644 --- a/doc/dbus-specification.xml +++ b/doc/dbus-specification.xml @@ -1688,12 +1688,16 @@ A method call message is required to have a MEMBER header field indicating the name of the method. 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. + INTERFACE field giving the interface the method is a part of. + Including the INTERFACE in all method call + messages is strongly recommended. + + + In the absence of an INTERFACE field, if two + or more interfaces on the same object have a method with the same + name, it is undefined which of those methods will be invoked. + Implementations may choose to either return an error, or deliver the + message as though it had an arbitrary one of those interfaces. Method call messages also include a PATH field -- 2.7.4