[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading D-Bus messages

From: Jan Djärv
Subject: Re: Reading D-Bus messages
Date: Sun, 26 Sep 2010 21:17:29 +0200
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; sv-SE; rv: Gecko/20100915 Thunderbird/3.1.4

Michael Albinus skrev 2010-09-26 20.38:

Thanks a lot, it works for me in both the X and non-X cases.

Just some minor remarks on your changes in dbusbind.c:

* dbus_fd_cb calls only xd_read_queued_messages. Couldn't both functions
   be merged? Or, since we have the file descriptor in the callback,
   shouldn't we call only xd_read_message for that socket?

Yes and yes. I was lazy, I saw that xd_read_queued_messages wasn't static and kept it just in case. I wasn't sure how to get the DbusConnection from a fd so I skipped that. But feel free to make any changes you think appropriate. I don't think xd_get_dispatch_status and xd_pending_messages are used for example.

* We assume that communication is socket base. This must not be true;
   see the comment in
   xd_find_watch_fd returns -1, we shall raise an error at least.

I'm not sure what you mean. If you look at the code, the functions dbus_watch_get_fd, dbus_watch_get_unix_fd and dbus_watch_get_socket all return the same thing, watch->fd. We don't really assume socket, any fd that can be passed to select will do. In practice on Unix-like systems, we can't get -1 (minus dbus-bugs of course).

        Jan D.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]