]> git.eshelyaron.com Git - emacs.git/commitdiff
* net/dbus.el (dbus-call-method-non-blocking): Handle the case the
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 27 Jul 2009 10:02:50 +0000 (10:02 +0000)
committerMichael Albinus <michael.albinus@gmx.de>
Mon, 27 Jul 2009 10:02:50 +0000 (10:02 +0000)
function returns nil.
(dbus-handle-event): Handle special return value :ignore.
Reported by Jan Moringen <jan.moringen@uni-bielefeld.de>.

lisp/ChangeLog
lisp/net/dbus.el

index a126b939a1908992c7f80538cd82e2c3af08f3f1..7922b083a9f4389e9c63554516a6008228a2f888 100644 (file)
@@ -1,3 +1,10 @@
+2009-07-27  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/dbus.el (dbus-call-method-non-blocking): Handle the case the
+       function returns nil.
+       (dbus-handle-event): Handle special return value :ignore.
+       Reported by Jan Moringen <jan.moringen@uni-bielefeld.de>.
+
 2009-07-26  Chong Yidong  <cyd@stupidchicken.com>
 
        * view.el (view-mode-enable): Don't define Helper-return-blurb if
index f586a4125debf3aa590d3097c5f0466ebbccedbf..894d7c637875a51f0c3adce55bca902cbec4dc1e 100644 (file)
@@ -184,7 +184,7 @@ usage: (dbus-call-method-non-blocking
          'dbus-call-method-non-blocking-handler args)))
     ;; Wait until `dbus-call-method-non-blocking-handler' has put the
     ;; result into `dbus-return-values-table'.
-    (while (not (gethash key dbus-return-values-table nil))
+    (while (eq (gethash key dbus-return-values-table :ignore) :ignore)
       (read-event nil nil 0.1))
 
     ;; Cleanup `dbus-return-values-table'.  Return the result.
@@ -368,9 +368,12 @@ If the HANDLER returns an `dbus-error', it is propagated as return message."
        ;; Return a message when it is a message call.
        (when (= dbus-message-type-method-call (nth 2 event))
          (dbus-ignore-errors
-           (apply 'dbus-method-return-internal
-            (nth 1 event) (nth 3 event) (nth 4 event)
-            (if (consp result) result (list result))))))
+           (if (eq result :ignore)
+               (dbus-method-return-internal
+                (nth 1 event) (nth 3 event) (nth 4 event))
+             (apply 'dbus-method-return-internal
+                    (nth 1 event) (nth 3 event) (nth 4 event)
+                    (if (consp result) result (list result)))))))
     ;; Error handling.
     (dbus-error
      ;; Return an error message when it is a message call.