From bd5712c363109ed86c0ffec3cfef6b7754691303 Mon Sep 17 00:00:00 2001 From: Chengwei Yang Date: Mon, 24 Jun 2013 16:59:14 +0800 Subject: [PATCH] DBus Specification: unknown key in match rule must be ignored unknown key in match rule just like unknown field in message header, to avoid compatibility issue if new key/field introduced in future, the dbus specification says "Again, if an implementation sees a header field code that it does not expect, it must ignore that field, as it will be part of a new (but compatible) version of this specification." This patch applied this rule to match rule. Thread: http://lists.freedesktop.org/archives/dbus/2013-June/015705.html Bug:https://bugs.freedesktop.org/show_bug.cgi?id=66114 Signed-off-by: Chengwei Yang --- bus/signals.c | 9 +++++---- doc/dbus-specification.xml | 8 +++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/bus/signals.c b/bus/signals.c index 28506d3..cef8d9c 100644 --- a/bus/signals.c +++ b/bus/signals.c @@ -1086,10 +1086,11 @@ bus_match_rule_parse (DBusConnection *matches_go_to, } else { - dbus_set_error (error, DBUS_ERROR_MATCH_RULE_INVALID, - "Unknown key \"%s\" in match rule", - key); - goto failed; + /* + * Since DBus Specification 0.22, unknown key in match rule must be ignored. + * Thread: http://lists.freedesktop.org/archives/dbus/2013-June/015705.html + */ + _dbus_verbose ("Unknown key \"%s\" in match rule\n", key); } ++i; diff --git a/doc/dbus-specification.xml b/doc/dbus-specification.xml index a6bedfa..8a2190d 100644 --- a/doc/dbus-specification.xml +++ b/doc/dbus-specification.xml @@ -74,8 +74,8 @@ 0.22 not yet released (commit log) - - + chengwei + unknown key in match rules must be ignored 0.21 @@ -4416,7 +4416,9 @@ The following table describes the keys that can be used to create - a match rule: + a match rule. Since D-Bus Specification version 0.22, Unknown key + in match rule must be ignored to avoid compatibility issue as it + will be part of a new (but compatible) version of this specification. The following table summarizes the D-Bus types. -- 1.7.9.5