Receiving dbus signals using low-level C API
Krishna R
sith.list at gmail.com
Wed Jan 24 18:20:41 PST 2007
Need some more help, sorry for the trouble...
I am able to send and recv fsignals fine, but i see that signals get dropped
rarely...is that even possible?
To send the signal i do the following steps in my app
dbus_bus_get()
dbus_message_new_signal()
dbus_message_append_args()
dbus_connection_send()
dbus_connection_flush()
dbus_message_unref()
dbus_connection_unref()
exits program.
One the recv side i add a match rule and set a filter function.
If i run the send app manually a few times from cmd line, i rarely see in
the recv terminal that the signal has not been got (i use fprintfs).
It happens once in 30 or 40 tries i do. Randomly.
I have error checks and debug print statements for each of the calls so i
know none of calls themselves fail. Send app exits as a sucess but the recv
side never got the signal sent.
Are there any tips for debugging this kind of problem. Or am i missing
something here.
Thanks!
-Krish
On 1/24/07, John (J5) Palmieri <johnp at redhat.com> wrote:
>
> On Wed, 2007-01-24 at 16:27 -0500, Havoc Pennington wrote:
>
> >
> > > 1. Is this a correct way to recv signals? Do i have to do
> > > dbus_message_unref(message) in the filter function after handling it
> > > before i return?
> >
> > I don't believe so, I could misremember, but it would be documented if
> > you did have to probably.
>
> Hmm, wait. I might be misremembering too. The filter function may
> unref for you and I think I was thinking of needing to unref after
> creating a reply message. So if one needs to keep a message around they
> need to ref it.
>
> --
> John (J5) Palmieri <johnp at redhat.com>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20070124/169a4ae7/attachment.html
More information about the dbus
mailing list