peer-to-peer connections not really documented
Submitted by Scott Tsai
Assigned to Simon McVittie
Description
While trying to use dbus-python over TCP, I noticed that handlers registered with ProxyObject.connect_to_signal() wasn't being called. Changing the address passed to dbus.server.Server from 'tc:bind=*' to 'unix:tmpdir=/tmp' and the handlers would be called as expected.
I managed to come up with a (likely incorrect) one line patch to dbus/connection.py to make ProxyObject.connect_to_signal work over TCP as well.
The two attached scripts demonstrate the problem:
- Run "python dbus-python-tcp-signal-bug/dbus-python-over-tcp-signal-dispatch-bug.py"
- The program terminates normally since running DBUS over Unix domain sockets
- Run "DBUS_OVER_TCP=1 python dbus-python-tcp-signal-bug/dbus-python-over-tcp-signal-dispatch-bug.py"
- The program waits indefinitely for the signal handler to fire.