[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 2f92177 1/2: Add interface arg to D-Bus PropertiesChanged signal.
From: |
Michael Albinus |
Subject: |
master 2f92177 1/2: Add interface arg to D-Bus PropertiesChanged signal. |
Date: |
Mon, 12 Oct 2020 05:42:04 -0400 (EDT) |
branch: master
commit 2f92177f80fb375fdf38d6db0af9853e951e9b83
Author: Hugh Daschbach <hdasch@fastmail.com>
Commit: Michael Albinus <michael.albinus@gmx.de>
Add interface arg to D-Bus PropertiesChanged signal.
* lisp/net/dbus.el (dbus-register-property, dbus-property-handler):
Fix signal generation. (Bug#43936)
* test/lisp/net/dbus-tests.el (dbus-test06-register-property-emits-signal):
Fix test.
---
lisp/net/dbus.el | 2 ++
test/lisp/net/dbus-tests.el | 11 ++++++-----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el
index 77ba526..bb2420e 100644
--- a/lisp/net/dbus.el
+++ b/lisp/net/dbus.el
@@ -1740,6 +1740,7 @@ clients from discovering the still incomplete interface.
(when emits-signal
(dbus-send-signal
bus service path dbus-interface-properties "PropertiesChanged"
+ interface
;; changed_properties.
(if (eq access :write)
'(:array: :signature "{sv}")
@@ -1818,6 +1819,7 @@ It will be registered for all objects created by
`dbus-register-property'."
(when (nth 1 object)
(dbus-send-signal
bus service path dbus-interface-properties "PropertiesChanged"
+ interface
;; changed_properties.
(if (eq :write (car object))
'(:array: :signature "{sv}")
diff --git a/test/lisp/net/dbus-tests.el b/test/lisp/net/dbus-tests.el
index cd2e166..f75f107 100644
--- a/test/lisp/net/dbus-tests.el
+++ b/test/lisp/net/dbus-tests.el
@@ -1118,10 +1118,10 @@ is in progress."
(with-timeout (1 (dbus--test-timeout-handler))
(while (null dbus--test-signal-received)
(read-event nil nil 0.1)))
- ;; It returns two arguments, "changed_properties" (an array of
- ;; dict entries) and "invalidated_properties" (an array of
- ;; strings).
- (should (equal dbus--test-signal-received `(((,property ("foo"))) ())))
+ ;; It returns three arguments, interface (a string),
+ ;; "changed_properties" (an array of dict entries) and
+ ;; "invalidated_properties" (an array of strings).
+ (should (equal dbus--test-signal-received `(,dbus--test-interface
((,property ("foo"))) ())))
(should
(equal
@@ -1144,7 +1144,8 @@ is in progress."
(read-event nil nil 0.1)))
(should
(equal
- dbus--test-signal-received `(((,property ((1 2 3)))) ())))
+ dbus--test-signal-received
+ `(,dbus--test-interface ((,property ((1 2 3)))) ())))
(should
(equal