From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#9581: 24.0.50; dbus-unregister-object fails if service is nil Date: Fri, 23 Sep 2011 17:37:31 +0200 Message-ID: <87ehz7e0ck.fsf@gmx.de> References: <87pqisi3lu.fsf@keller.adm.naquadah.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1316792338 11510 80.91.229.12 (23 Sep 2011 15:38:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 23 Sep 2011 15:38:58 +0000 (UTC) Cc: 9581@debbugs.gnu.org To: Julien Danjou Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 23 17:38:54 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R77q0-00035g-Ki for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 Sep 2011 17:38:52 +0200 Original-Received: from localhost ([::1]:58771 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R77pz-0003pC-F6 for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 Sep 2011 11:38:51 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:50719) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R77pn-0003Yv-80 for bug-gnu-emacs@gnu.org; Fri, 23 Sep 2011 11:38:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R77pk-0006W9-7g for bug-gnu-emacs@gnu.org; Fri, 23 Sep 2011 11:38:39 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60240) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R77pk-0006W4-2L for bug-gnu-emacs@gnu.org; Fri, 23 Sep 2011 11:38:36 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1R77qA-00086x-GD for bug-gnu-emacs@gnu.org; Fri, 23 Sep 2011 11:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Sep 2011 15:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9581 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9581-submit@debbugs.gnu.org id=B9581.131679228731111 (code B ref 9581); Fri, 23 Sep 2011 15:39:02 +0000 Original-Received: (at 9581) by debbugs.gnu.org; 23 Sep 2011 15:38:07 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R77pG-00085j-8x for submit@debbugs.gnu.org; Fri, 23 Sep 2011 11:38:07 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.23]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1R77pC-00085Q-IZ for 9581@debbugs.gnu.org; Fri, 23 Sep 2011 11:38:03 -0400 Original-Received: (qmail invoked by alias); 23 Sep 2011 15:37:34 -0000 Original-Received: from p57BB97B6.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.151.182] by mail.gmx.net (mp053) with SMTP; 23 Sep 2011 17:37:34 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX18chDASNUkcmMXzbu4AYRHUuR0wOQDTMZU7S4UNHU mvMwVWVvtRfQH8 In-Reply-To: <87pqisi3lu.fsf@keller.adm.naquadah.org> (Julien Danjou's message of "Fri, 23 Sep 2011 01:01:17 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 23 Sep 2011 11:39:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:51722 Archived-At: Julien Danjou writes: > When using `dbus-register-signal', this happens: > 1. the dbus_bus_add_match() function is called to add a match on the bus > 2. the (match callback) pair is recorded into > `dbus-registered-objets-table' > > This makes things work. When a signal happens, something is looking into > `dbus-registered-objets-table' and call the callback function. > > But to stop listening for a signal, the function to use is > `dbus-unregister-object', and it is doing this: > 1. remove the (match callback) pair from `dbus-registered-objets-table' > 2. call ReleaseName on the service we were listening > > While I agree on point 1., the point 2. is totally irrelevant in such a > case. There's no need to do such a thing, the name has never been > requested with RequestName before. It's simply an error. We are speaking abut the generalized `dbus-unregister-object', which is used for both signals and methods. ReleaseName shall be called only in case a *method* has been registered; I'll fix this. > I think that: > - step 2 should be removed or another function should be created which > does not send a ReleaseName Nope. See above. > - dbus_bus_remove_match() should be used to remove the watch from the > bus, which would be a lot cleaner. Good point. Registering a signal shall also keep the match string in dbus-registered-objects-table (it doesn't yet). Then we could use this string to send RemoveMatch. I'll prepare a patch for this (hopefully in time before starting the pretest). Best regards, Michael.