From 8c19b6e3679ca14e77032b88366b7e5f4ac62410 Mon Sep 17 00:00:00 2001 From: Chengwei Yang Date: Wed, 26 Jun 2013 10:21:31 +0800 Subject: [PATCH 2/3] 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 --- tools/dbus-monitor.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/tools/dbus-monitor.c b/tools/dbus-monitor.c index 58debec..32e7e62 100644 --- a/tools/dbus-monitor.c +++ b/tools/dbus-monitor.c @@ -393,22 +393,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; -- 1.7.9.5