unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#43936: 28.0.50; D-Bus PropertiesChanged signal lacks interface argument.
@ 2020-10-12  0:45 Hugh Daschbach
  2020-10-12  9:44 ` Michael Albinus
  0 siblings, 1 reply; 2+ messages in thread
From: Hugh Daschbach @ 2020-10-12  0:45 UTC (permalink / raw)
  To: 43936

[-- Attachment #1: Type: text/plain, Size: 475 bytes --]

The D-Bus specification
(https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties)
defines three arguments for
org.freedesktop.DBus.Properties.PropertiesChanged.  Currently, in
dbus.el, only two are provided.

The attached patch adds the interface parameter to the test
‘dbus-test06-register-property-emits-signal’
and to the sources of the signal: ‘dbus-register-property’ and
‘dbus-property-handler’.

Thanks,
Hugh


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Add interface argument to PropertiesChanged signal and test. --]
[-- Type: text/x-patch, Size: 2586 bytes --]

From 176a110fc57f0c3bc505d80abe329fec4318195c Mon Sep 17 00:00:00 2001
From: Hugh Daschbach <hdasch@fastmail.com>
Date: Sun, 11 Oct 2020 14:48:19 -0700
Subject: [PATCH] Add interface arg to PropertiesChanged signal.

* test/lisp/net/dbus-tests.el
(dbus-test06-register-property-emits-signal): Fix test.

* lisp/net/dbus.el (dbus-register-property, dbus-property-handler):
Fix signal generation.
---
 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 77ba5266dcb..bb2420e1f49 100644
--- a/lisp/net/dbus.el
+++ b/lisp/net/dbus.el
@@ -1740,6 +1740,7 @@ dbus-register-property
     (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 @@ dbus-property-handler
 	    (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 cd2e166c103..f75f107dfb6 100644
--- a/test/lisp/net/dbus-tests.el
+++ b/test/lisp/net/dbus-tests.el
@@ -1118,10 +1118,10 @@ dbus-test06-register-property-emits-signal
 	(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 @@ dbus-test06-register-property-emits-signal
             (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
-- 
2.28.0


[-- Attachment #3: Type: text/plain, Size: 3045 bytes --]




In GNU Emacs 28.0.50 (build 20, x86_64-pc-linux-gnu, X toolkit, cairo version 1.17.3, Xaw3d scroll bars)
 of 2020-10-11 built on klaatu
Repository revision: 0f79544368c0dc343edcd97c3c7992aeab415b68
Repository branch: submission
Windowing system distributor 'The X.Org Foundation', version 11.0.12009000
System Description: Artix Linux

Configured using:
 'configure --with-x-toolkit=lucid'

Configured features:
XAW3D XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB
NOTIFY INOTIFY ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB
TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON
PDUMPER LCMS2

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: ERT-Results

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail
rmail-loaddefs auth-source eieio eieio-core eieio-loaddefs
password-cache json map text-property-search mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date
cl-extra vc-git diff-mode easy-mmode bug-reference dbus-tests dbus
cl-seq cl-macs pcase xml subr-x seq byte-opt gv bytecomp byte-compile
cconv ert pp ewoc debug backtrace help-mode easymenu find-func
cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
cairo x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 124593 10066)
 (symbols 48 10063 1)
 (strings 32 26290 1920)
 (string-bytes 1 818696)
 (vectors 16 15108)
 (vector-slots 8 197378 10992)
 (floats 8 91 209)
 (intervals 56 413 0)
 (buffers 992 13))

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#43936: 28.0.50; D-Bus PropertiesChanged signal lacks interface argument.
  2020-10-12  0:45 bug#43936: 28.0.50; D-Bus PropertiesChanged signal lacks interface argument Hugh Daschbach
@ 2020-10-12  9:44 ` Michael Albinus
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Albinus @ 2020-10-12  9:44 UTC (permalink / raw)
  To: Hugh Daschbach; +Cc: 43936-done

Hugh Daschbach <hugh@ccss.com> writes:

Hi Hugh,

> The attached patch adds the interface parameter to the test
> ‘dbus-test06-register-property-emits-signal’
> and to the sources of the signal: ‘dbus-register-property’ and
> ‘dbus-property-handler’.

Indeed, thanks for your report! I've applied your patch to the master
branch, closing the bug.

> Thanks,
> Hugh

Best regards, Michael.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-12  9:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-12  0:45 bug#43936: 28.0.50; D-Bus PropertiesChanged signal lacks interface argument Hugh Daschbach
2020-10-12  9:44 ` Michael Albinus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).