GLib bingings: howto catch proxy destruction / prevent DBUS_G_PROXY_DESTROYED assert

g4-lisz at tonarchiv.ch g4-lisz at tonarchiv.ch
Sun Jan 25 05:07:14 PST 2009


Hello

I'm writing some application listening to Skype on D-Bus.

It's a daemon and therefore should be failsafe.

I'm using some "pinging" thread which periodically asks Skype about its 
state:

 > "GET CONNSTATUS"
< "CONNSTATUS ONLINE"

Now the trouble is that Skype doesn't send any signal on it's shutdown.
Therefore the call
    dbus_g_proxy_call(proxy, "Invoke", &error,
                                G_TYPE_STRING, command, G_TYPE_INVALID,
                                G_TYPE_VALUE, &reply, G_TYPE_INVALID);

may lead to a failed assertion when Skype is closed:

  CRITICAL **: dbus_g_proxy_call: assertion `!DBUS_G_PROXY_DESTROYED 
(proxy)' failed

Is there a way to get a signal / catch an exception / register a 
callback function or similar when the proxy has been destroyed?

Any help would be much appreciated

T


More information about the dbus mailing list