unknown method AddMatch

Olivier Andrieu oliv__a at users.sourceforge.net
Mon Aug 9 15:14:48 PDT 2004


 Havoc Pennington [Sun, 08 Aug 2004]:
 > On Sun, 2004-08-08 at 17:16, Olivier Andrieu wrote:
 > > 
 > > Ah yes, it's a method call, it wasn't filtered and there are no
 > > handlers registered, so dbus_connection_dispatch() generates this
 > > error. Maybe it should check whether the message's destination is
 > > the actual connection and not generate the error in case of
 > > eavesdropping.
 > 
 > How are we going to know that though?

If the destination is a base service, that's no problem. Now, when the
distination is a named service ... 

 > >  > This patch seems to fix it.  I'm not entirely sure if it's the
 > >  > correct fix.
 > > 
 > > I'd say yes.
 > 
 > Seems OK for dbus-monitor, it would be broken though if
 > monitor-type functionality were in the same process as other
 > handlers (because instead of just snooping without side effect,
 > we'd keep the message from going to its handler)

In that case, the filter function need to track the services owned by
the connection (listening to the ServiceAcquired/ServiceLost signals)
and return DBUS_HANDLER_RESULT_NOT_YET_HANDLED for messages that have
one of those as destination. That should work.

-- 
   Olivier


More information about the dbus mailing list