glib dbus bindings and pthreats

g4-lisz at tonarchiv.ch g4-lisz at tonarchiv.ch
Thu Apr 2 12:43:23 PDT 2009


Hello,

I'm writing a server/client application which makes heavy use of pthreads.

One thread exposes an "invoke" method
(dbus_g_connection_register_g_object()) on DBUS and starts g_main_loop.

Another thread opens a DBUS proxy from the same conncection for making
dbus_g_proxy_calls.

Sadly this constellation seems not to be threadsafe and the application
crashes from time to time with a segmentation fault.

Synchronization of "Invoke" method and dbus_g_proxy_call with mutexes
didn't do the trick...

What is the right approach to do what i want: Exposing an object and
making proxy calls at the same time?

Any help would be much appreciated!

TW



More information about the dbus mailing list