What is required to run GMainLoop inside GThread with Dbus functionality.

Mukesh Savaliya Mukesh.Savaliya at MatrixComSec.com
Fri Aug 20 21:07:36 PDT 2010


Hello, please reply to this, I am helpless.

   I am suspecting on GThread functionality and its dependency on other
libraries. As, I have tried all the way, but still its not working. The same
thing is working on PC very well. This means PC library has all the requires
files, where as something is missing on ARM board.

 Can anybody provide me the dependency files required for running GMainLoop
and GThread with Dbus?

-----Original Message-----
From: dbus-bounces+mukesh.savaliya=matrixcomsec.com at lists.freedesktop.org
[mailto:dbus-bounces+mukesh.savaliya=matrixcomsec.com at lists.freedesktop.org]
On Behalf Of Mukesh Savaliya
Sent: Friday, August 20, 2010 9:19 AM
To: 'Alban Crequy'
Cc: dbus at lists.freedesktop.org
Subject: RE: working of g_main_loop_run() and GThread on different platform.


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


_______________________________________________
dbus mailing list
dbus at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dbus




More information about the dbus mailing list