From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?SmFuIERqw6Rydg==?= Newsgroups: gmane.emacs.devel Subject: Re: Reading D-Bus messages Date: Sun, 26 Sep 2010 21:17:29 +0200 Message-ID: <4C9F9C49.5090107@swipnet.se> References: <878w2tx6gk.fsf@gmx.de> <4C9A493F.4050701@cornell.edu> <874odhyliu.fsf@gmx.de> <4C9B452E.1040101@cornell.edu> <4C9B63A1.2060604@cornell.edu> <87y6asy0uh.fsf@gmx.de> <4C9BBD5C.30201@cornell.edu> <83tylgtbo8.fsf@gnu.org> <871v8jhcw2.fsf@gmx.de> <4C9CB57E.1010708@swipnet.se> <8339sztayd.fsf@gnu.org> <87tyleetju.fsf@gmx.de> <4C9DA26F.4030007@swipnet.se> <87mxr5epfa.fsf@gmx.de> <4C9E39A1.8050608@swipnet.se> <87hbhdee7k.fsf@gmx.de> <4C9F7563.3090608@swipnet.se> <87mxr4bb9s.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1285528674 3360 80.91.229.12 (26 Sep 2010 19:17:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 26 Sep 2010 19:17:54 +0000 (UTC) Cc: emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 26 21:17:52 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OzwjN-0001eY-0p for ged-emacs-devel@m.gmane.org; Sun, 26 Sep 2010 21:17:49 +0200 Original-Received: from localhost ([127.0.0.1]:53565 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OzwjM-0006jy-AR for ged-emacs-devel@m.gmane.org; Sun, 26 Sep 2010 15:17:48 -0400 Original-Received: from [140.186.70.92] (port=40738 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OzwjF-0006iR-8p for emacs-devel@gnu.org; Sun, 26 Sep 2010 15:17:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OzwjE-0005Mi-1F for emacs-devel@gnu.org; Sun, 26 Sep 2010 15:17:41 -0400 Original-Received: from smtprelay-h31.telenor.se ([213.150.131.4]:38626) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OzwjD-0005MO-Nv for emacs-devel@gnu.org; Sun, 26 Sep 2010 15:17:40 -0400 Original-Received: from ipb4.telenor.se (ipb4.telenor.se [195.54.127.167]) by smtprelay-h31.telenor.se (Postfix) with ESMTP id DAEF7C427 for ; Sun, 26 Sep 2010 21:17:38 +0200 (CEST) X-SENDER-IP: [85.225.45.35] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ar8vAIU5n0xV4S0jPGdsb2JhbACDG58ZDAEBAQE1LbMxkUSBIoMudASNOA X-IronPort-AV: E=Sophos;i="4.57,239,1283724000"; d="scan'208";a="1675303006" Original-Received: from c-232de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.35]) by ipb4.telenor.se with ESMTP; 26 Sep 2010 21:17:30 +0200 Original-Received: from [172.20.199.13] (zeplin [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id 24AEE7FA05A; Sun, 26 Sep 2010 21:17:30 +0200 (CEST) User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; sv-SE; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 In-Reply-To: <87mxr4bb9s.fsf@gmx.de> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:130932 Archived-At: 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 > . If > 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.