Monitor fixes

Anders Carlsson andersca at gnome.org
Mon Feb 14 05:52:54 PST 2005


Hello,

here's a patch that makes it possible to receive all messages and 
message replies using dbus-monitor. I've only tested it under D-BUS 
0.23, but the fix applies to HEAD, so theoretically it should work.

I'm also not sure how this works with more fine-grained policy 
configurations. Turning off eavesdropping prevents the messages from 
coming through, but I haven't really tried anything else.

Anders
-------------- next part --------------
Index: bus/bus.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/bus.c,v
retrieving revision 1.59
diff -u -r1.59 bus.c
--- bus/bus.c	9 Nov 2004 06:11:33 -0000	1.59
+++ bus/bus.c	14 Feb 2005 13:54:05 -0000
@@ -1183,6 +1183,9 @@
                       return FALSE;
                     }
                 }
+	      else if (addressed_recipient != proposed_recipient /* eavesdropping */)
+		requested_reply = TRUE;
+
             }
         }
       else
@@ -1335,6 +1338,7 @@
        * may reply.
        */
       if (sender && addressed_recipient &&
+	  addressed_recipient == proposed_recipient /* not eavesdropping */ &&
           !bus_connections_expect_reply (bus_connection_get_connections (sender),
                                          transaction,
                                          sender, addressed_recipient,


More information about the dbus mailing list