DBus service and interface are available, but aren't responding
Adam Olsen
arolsen at gmail.com
Tue Oct 10 08:19:37 PDT 2006
Hi,
I've got an application in which I've been using dbus which has worked ok
until I tried moving the client code to a place before importing things like
gtk and gstreamer. I wanted the client to test the service and see if it
was available because doing this before importing those libraries will speed
things up a bit.
This code works:
def test_dbus(bus, interface):
obj = bus.get_object('org.freedesktop.DBus', '/org/freedesktop/DBus')
dbus_iface = dbus.Interface(obj, 'org.freedesktop.DBus')
avail = dbus_iface.ListNames()
return interface in avail
if test_dbus(bus, 'org.exaile.DBusInterface'):
remote_object = bus.get_object("org.exaile.DBusInterface",
"/DBusInterfaceObject")
iface = dbus.Interface(remote_object, "org.exaile.DBusInterface")
iface.test_service("testing dbus service")
up until the line that says "iface.test_service", and then it hangs until I
get the message:
DbusException: No reply within the specified time
I've got gobject.threads_init() called before this, I'm not sure what is
wrong as this code used to work before I moved the code.
Adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20061010/b9d265e9/attachment.html
More information about the dbus
mailing list