aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus <[email protected]>2009-07-27 10:02:50 +0000
committerMichael Albinus <[email protected]>2009-07-27 10:02:50 +0000
commit3dec5c364b365689949a7d8b92682562dfa41da6 (patch)
tree2fddfe529d62349c4aa0a530141db3f1106a8aa3
parenta8c0cc186d6d37a07ab2bfe50e4a0a46abe663ce (diff)
* 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 <[email protected]>.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/net/dbus.el11
2 files changed, 14 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a126b939a1..7922b083a9 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+2009-07-27 Michael Albinus <[email protected]>
+
+ * 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 <[email protected]>.
+
2009-07-26 Chong Yidong <[email protected]>
* view.el (view-mode-enable): Don't define Helper-return-blurb if
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el
index f586a4125d..894d7c6378 100644
--- a/lisp/net/dbus.el
+++ b/lisp/net/dbus.el
@@ -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.