]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
dbus-monitor: remove redundant match rules
authorChengwei Yang <chengwei.yang@intel.com>
Wed, 26 Jun 2013 02:21:31 +0000 (10:21 +0800)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Tue, 8 Oct 2013 10:15:35 +0000 (11:15 +0100)
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 <chengwei.yang@intel.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66107
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
tools/dbus-monitor.c

index cf17f64284be46728c84503fc81190ca68d8c7f6..1aa885f746d2a9674c662bfa18254fc0fb9b1cfe 100644 (file)
@@ -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;