DBus service and interface are available, but aren't responding
John (J5) Palmieri
johnp at redhat.com
Wed Oct 11 07:46:49 PDT 2006
On Tue, 2006-10-10 at 09:19 -0600, Adam Olsen wrote:
> 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
Can you post the current code and a diff between the two?
--
John (J5) Palmieri <johnp at redhat.com>
More information about the dbus
mailing list