working of g_main_loop_run() and GThread on different platform.

Mukesh Savaliya Mukesh.Savaliya at MatrixComSec.com
Thu Aug 19 20:48:50 PDT 2010


Dear, Alban Crequy,

I have used strace ,and observed that DBusGProxy *Proxy =0. And error
message shows "Connection is closed". 

But,I am wondering why this is happening only on ARM board. It gets
DbusGConnection connection=(int)xyz. But proxy is 0. And this happens only
when I use g_main_loop_run(mainloop),inside a thread.

What is missing than?

Thanks for replying.

-----Original Message-----
From: Alban Crequy [mailto:alban.crequy at collabora.co.uk] 
Sent: Thursday, August 19, 2010 4:46 PM
To: Mukesh Savaliya
Cc: dbus at lists.freedesktop.org
Subject: Re: working of g_main_loop_run() and GThread on different platform.

Le Wed, 18 Aug 2010 14:25:27 +0530,
"Mukesh Savaliya" <Mukesh.Savaliya at MatrixComSec.com> a écrit :

> G_main_loop_run() which is running inside  GThread. Is there any
> particular things in dbus or glib, which prevents
> the remote events invoking the callback function of Glib?

Can you use strace on the thread which is supposed to receive the
D-Bus signal? You will know whether or not your thread receives the
D-Bus signal on the socket.

1. If it is received, dbus_g_proxy_connect_signal is not done correctly.
  Is there any error on stderr or syslog?

2. If it is not received:

  2.1. Is your thread blocked on select() or poll()? You can check if
  the file descriptor for D-Bus is correctly specified in select/poll.

  2.2. You can also check with dbus-monitor whether the D-Bus method
  call "AddMatch" is done correctly on the right object with the right
  match rule when you create the proxy and when you connect to the D-Bus
  signal.

BR,
Alban




More information about the dbus mailing list