Comment 8 for bug 488967

Revision history for this message
Markus Korn (thekorn) wrote :

In the attached branch I tried to put together a sample dbus service which *should* send directed signals, but somehow it is not working as I expect it to work.

There are two scripts, service.py which starts the service, and client.py (0|1), the client. starting the client with argument '1' means 'subscribe to signal', '0' means 'don't do this. If the client should listen for the signal, it subscribes to the "Hello" signal after 2 seconds for 10 seconds, and then unsubscribes again.

But as you might find out when you start two clients (one which is subscribed to the signal, and the other one is not) both clients receive the signal :(

On the other hand when you change the set_destination statement in service.py (~line 123) to some random bus name it works as expected, no connected client, no matter if subscribed or not receives the signal.