From: Chengwei Yang Date: Wed, 26 Jun 2013 02:21:31 +0000 (+0800) Subject: dbus-monitor: remove redundant match rules X-Git-Tag: dbus-1.7.6~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1451f946c153fffe85c2a0a9d52446ff21b42fe8;p=thirdparty%2Fdbus.git dbus-monitor: remove redundant match rules Currently, DBus Specification only consists of four message types, so to monitor all the types of message, no need to match all of them but just left it empty is OK. Signed-off-by: Chengwei Yang Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66107 Reviewed-by: Simon McVittie --- diff --git a/tools/dbus-monitor.c b/tools/dbus-monitor.c index cf17f6428..1aa885f74 100644 --- a/tools/dbus-monitor.c +++ b/tools/dbus-monitor.c @@ -383,22 +383,7 @@ main (int argc, char *argv[]) else { dbus_bus_add_match (connection, - EAVESDROPPING_RULE ",type='signal'", - &error); - if (dbus_error_is_set (&error)) - goto lose; - dbus_bus_add_match (connection, - EAVESDROPPING_RULE ",type='method_call'", - &error); - if (dbus_error_is_set (&error)) - goto lose; - dbus_bus_add_match (connection, - EAVESDROPPING_RULE ",type='method_return'", - &error); - if (dbus_error_is_set (&error)) - goto lose; - dbus_bus_add_match (connection, - EAVESDROPPING_RULE ",type='error'", + EAVESDROPPING_RULE, &error); if (dbus_error_is_set (&error)) goto lose;