Mercurial > emacs
changeset 87092:1ddad0de60e5
* dbusbind.c (xd_read_message): Return value is a Lisp_Object.
Move check for Vdbus_registered_functions_table to
xd_read_queued_messages.
(xd_read_queued_messages): Protect xd_read_message calls by
internal_condition_case_1.
author | Michael Albinus <michael.albinus@gmx.de> |
---|---|
date | Wed, 05 Dec 2007 21:53:40 +0000 |
parents | c82c15b719a3 |
children | 6cb7edfb2f4e |
files | src/ChangeLog src/dbusbind.c |
diffstat | 2 files changed, 21 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Wed Dec 05 19:59:46 2007 +0000 +++ b/src/ChangeLog Wed Dec 05 21:53:40 2007 +0000 @@ -1,3 +1,11 @@ +2007-12-05 Michael Albinus <michael.albinus@gmx.de> + + * dbusbind.c (xd_read_message): Return value is a Lisp_Object. + Move check for Vdbus_registered_functions_table to + xd_read_queued_messages. + (xd_read_queued_messages): Protect xd_read_message calls by + internal_condition_case_1. + 2007-12-04 Michael Albinus <michael.albinus@gmx.de> * dbusbind.c (QCdbus_system_bus, QCdbus_session_bus): Renamed from
--- a/src/dbusbind.c Wed Dec 05 19:59:46 2007 +0000 +++ b/src/dbusbind.c Wed Dec 05 21:53:40 2007 +0000 @@ -538,7 +538,7 @@ /* Read queued incoming message of the D-Bus BUS. BUS is a Lisp symbol, either :system or :session. */ -void +Lisp_Object xd_read_message (bus) Lisp_Object bus; { @@ -551,12 +551,6 @@ uint dtype; char service[1024], path[1024], interface[1024], member[1024]; - /* Vdbus_registered_functions_table will be made as hash table in - dbus.el. When it isn't loaded yet, it doesn't make sense to - handle D-Bus messages. */ - if (!HASH_TABLE_P (Vdbus_registered_functions_table)) - return; - /* Open a connection to the bus. */ connection = xd_initialize (bus); @@ -635,8 +629,18 @@ void xd_read_queued_messages () { - xd_read_message (QCdbus_system_bus); - xd_read_message (QCdbus_session_bus); + + /* Vdbus_registered_functions_table will be made as hash table in + dbus.el. When it isn't loaded yet, it doesn't make sense to + handle D-Bus messages. Furthermore, we ignore all Lisp errors + during the call. */ + if (HASH_TABLE_P (Vdbus_registered_functions_table)) + { + internal_condition_case_1 (xd_read_message, QCdbus_system_bus, + Qerror, Fidentity); + internal_condition_case_1 (xd_read_message, QCdbus_session_bus, + Qerror, Fidentity); + } } DEFUN ("dbus-register-signal", Fdbus_register_signal, Sdbus_register_signal,