all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Julien Danjou <julien@danjou.info>
Cc: 9581@debbugs.gnu.org
Subject: bug#9581: 24.0.50; dbus-unregister-object fails if service is nil
Date: Fri, 23 Sep 2011 17:37:31 +0200	[thread overview]
Message-ID: <87ehz7e0ck.fsf@gmx.de> (raw)
In-Reply-To: <87pqisi3lu.fsf@keller.adm.naquadah.org> (Julien Danjou's message of "Fri, 23 Sep 2011 01:01:17 +0200")

Julien Danjou <julien@danjou.info> 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.





  reply	other threads:[~2011-09-23 15:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-22 23:01 bug#9581: 24.0.50; dbus-unregister-object fails if service is nil Julien Danjou
2011-09-23 15:37 ` Michael Albinus [this message]
2011-09-23 16:12   ` Julien Danjou
2011-09-24 11:50     ` Michael Albinus
2011-09-24 14:19       ` Julien Danjou
2011-09-24 14:37         ` Michael Albinus
2011-09-25 11:38           ` Julien Danjou
2011-09-25 11:59             ` Michael Albinus
2011-09-25 12:19               ` Julien Danjou
2011-09-25 16:03                 ` Michael Albinus
2011-09-26 12:16                   ` Julien Danjou
2011-09-26 13:57                     ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ehz7e0ck.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=9581@debbugs.gnu.org \
    --cc=julien@danjou.info \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.