unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Daniel Colascione <dancol@dancol.org>
Cc: emacs-devel@gnu.org
Subject: Re: trunk r116499: Improve dbus error handling; detect bus failure
Date: Mon, 24 Feb 2014 09:54:45 +0100	[thread overview]
Message-ID: <878ut0gaay.fsf@gmx.de> (raw)
In-Reply-To: <530B01C3.5010209@dancol.org> (Daniel Colascione's message of "Mon, 24 Feb 2014 00:24:35 -0800")

Daniel Colascione <dancol@dancol.org> writes:

>>> +	(dbus-notice-synchronous-call-errors): New function.
>>> +	(dbus-handle-event): Raise errors directly only when `dbus-debug'
>>> +	is true, not all the time.
>>
>> Why that? You cannot assume that `dbus-event-error-functions' is non-nil
>> (and contains `dbus-notice-synchronous-call-errors').
>
> We still call dbus-event-error-functions.  In fact, that's how error
> propagation to synchronous calls works now.

Yes, but you also silently assume that `dbus-notice-synchronous-call-errors'
is called from there ...

> First of all, before my change, the dbus could would just hang in
> response to bus disconnects. Now calls terminate immediately with a
> reasonable error. dbus disconnects the bus on certain usage
> errors. Here is a call that results in an immediate bus disconnect:
>
> (dbus-call-method :session "org.freedesktop.secrets"
> "/org/freedesktop/secrets/collection/login"
> "org.freedesktop.Secret.Collection" "SearchItems" '(:array
> (:dict-entry "host" ("xxxx" "xxxx")) (:dict-entry "port" "imaps")))

Wow, this is really strange. It's not obvious to me whether this is a
D-Bus bug, or whether this is intended by the "org.freedesktop.secrets"
daemon. Anyway, you are right, this must be catched.

>> And *if* you are applying such changes, I would expect respective doc
>> changes, for example explainig the (changed) structure of the values in
>> `dbus-return-values-table', or mentioning
>> `dbus-notice-synchronous-call-errors' and its intended use in dbus.texi.
>
> Neither of these symbols is public. The contractual behavior has not
> changed.

You have added `dbus-notice-synchronous-call-errors' to
`dbus-event-error-functions'. This is a public change, and it deserves
documentation.

Furthermore, I had developers in mind when I've asked for doc
enhancement. Even I, as the original writer of the code, need to consult
the doc strings for hash table structures and alike. It would ease our
life, if the doc is up-to-date and reasonable.

Best regards, Michael.



  reply	other threads:[~2014-02-24  8:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1WGhnF-0006bq-Ma@vcs.savannah.gnu.org>
2014-02-24  8:18 ` trunk r116499: Improve dbus error handling; detect bus failure Michael Albinus
2014-02-24  8:24   ` Daniel Colascione
2014-02-24  8:54     ` Michael Albinus [this message]
2014-02-24 11:45       ` Peter Münster
2014-02-24 12:50         ` Daniel Colascione
2014-02-24 12:59           ` Daniel Colascione
2014-02-24 13:09           ` Michael Albinus
2014-02-24 13:14             ` Michael Albinus
2014-02-24 13:48               ` Daniel Colascione
2014-02-24 14:25                 ` Michael Albinus
2014-02-24 18:52                   ` Peter Münster

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=878ut0gaay.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=dancol@dancol.org \
    --cc=emacs-devel@gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).