emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r108214: * net/dbus.el (dbus-call-met


From: Michael Albinus
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r108214: * net/dbus.el (dbus-call-method): Restore events not from D-Bus. (Bug#11447)
Date: Sun, 13 May 2012 11:05:04 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 108214
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Sun 2012-05-13 11:05:04 +0200
message:
  * net/dbus.el (dbus-call-method): Restore events not from D-Bus.  (Bug#11447)
modified:
  lisp/ChangeLog
  lisp/net/dbus.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-05-13 03:05:06 +0000
+++ b/lisp/ChangeLog    2012-05-13 09:05:04 +0000
@@ -1,3 +1,8 @@
+2012-05-13  Michael Albinus  <address@hidden>
+
+       * net/dbus.el (dbus-call-method): Restore events not from D-Bus.
+       (Bug#11447)
+
 2012-05-13  Stefan Monnier  <address@hidden>
 
        Move define-obsolete-variable-alias before the var's definition.

=== modified file 'lisp/net/dbus.el'
--- a/lisp/net/dbus.el  2012-04-23 05:44:49 +0000
+++ b/lisp/net/dbus.el  2012-05-13 09:05:04 +0000
@@ -263,12 +263,16 @@
         (apply
          'dbus-message-internal dbus-message-type-method-call
          bus service path interface method 'dbus-call-method-handler args)))
+
     ;; Wait until `dbus-call-method-handler' has put the result into
     ;; `dbus-return-values-table'.  If no timeout is given, use the
-    ;; default 25".
+    ;; default 25".  Events which are not from D-Bus must be restored.
     (with-timeout ((if timeout (/ timeout 1000.0) 25))
       (while (eq (gethash key dbus-return-values-table :ignore) :ignore)
-       (read-event nil nil 0.1)))
+       (let ((event (let (unread-command-events) (read-event))))
+         (when (and event (not (ignore-errors (dbus-check-event event))))
+           (setq unread-command-events
+                 (append unread-command-events (list event)))))))
 
     ;; Cleanup `dbus-return-values-table'.  Return the result.
     (prog1
@@ -1089,9 +1093,7 @@
 and PATH must be a valid object path.  The last two parameters
 are strings.  The result, the introspection data, is a string in
 XML format."
-  ;; We don't want to raise errors.  `dbus-call-method-non-blocking'
-  ;; is used, because the handler can be registered in our Emacs
-  ;; instance; caller and callee would block each other.
+  ;; We don't want to raise errors.
   (dbus-ignore-errors
     (dbus-call-method
      bus service path dbus-interface-introspectable "Introspect"
@@ -1534,7 +1536,7 @@
 existing path name, and the list of available interface objects.
 An interface object is another cons, which car is the interface
 name, and the cdr is the list of properties as returned by
-`dbus-get-all-properties' for that path and interface. Example:
+`dbus-get-all-properties' for that path and interface.  Example:
 
 \(dbus-get-all-managed-objects :session \"org.gnome.SettingsDaemon\" \"/\")
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]