# HG changeset patch # User Michael Albinus # Date 1248688958 0 # Node ID 4c431a52ce37bd9fe57316ef622dd8f0ccf3113b # Parent 917282acffdc1163693397ea668926ed286227d6 * 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 . diff -r 917282acffdc -r 4c431a52ce37 lisp/net/dbus.el --- a/lisp/net/dbus.el Mon Jul 27 04:19:57 2009 +0000 +++ b/lisp/net/dbus.el Mon Jul 27 10:02:38 2009 +0000 @@ -184,7 +184,7 @@ '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 @@ ;; 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.