aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Albinus2020-10-29 16:56:40 +0100
committerMichael Albinus2020-10-29 16:56:40 +0100
commit372739b4069dee1911606817cf962b6ff8b49bac (patch)
tree767691f795641c7f9622a8bedfb921e05f3e2aed /src
parentf5e080fb1f90f74cd43ff1fa46280a107fbf7757 (diff)
downloademacs-372739b4069dee1911606817cf962b6ff8b49bac.tar.gz
emacs-372739b4069dee1911606817cf962b6ff8b49bac.zip
Handle several children of PATH in dbus-managed-objects-handler
* lisp/net/dbus.el (dbus-managed-objects-handler): Handle several children of PATH. (Bug#44298) * src/dbusbind.c (xd_signature, xd_append_arg): Check object path. * test/lisp/net/dbus-tests.el (dbus-test09-get-managed-objects): Tag it :expensive-test. Remove superfluous check.
Diffstat (limited to 'src')
-rw-r--r--src/dbusbind.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/dbusbind.c b/src/dbusbind.c
index 7904606d39e..dc4db5c8513 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -409,9 +409,12 @@ xd_signature (char *signature, int dtype, int parent_type, Lisp_Object object)
409 case DBUS_TYPE_STRING: 409 case DBUS_TYPE_STRING:
410 case DBUS_TYPE_OBJECT_PATH: 410 case DBUS_TYPE_OBJECT_PATH:
411 case DBUS_TYPE_SIGNATURE: 411 case DBUS_TYPE_SIGNATURE:
412 /* We dont check the syntax of object path and signature. This 412 /* We dont check the syntax of signature. This will be done by
413 will be done by libdbus. */ 413 libdbus. */
414 CHECK_STRING (object); 414 if (dtype == DBUS_TYPE_OBJECT_PATH)
415 XD_DBUS_VALIDATE_PATH (object)
416 else
417 CHECK_STRING (object);
415 sprintf (signature, "%c", dtype); 418 sprintf (signature, "%c", dtype);
416 break; 419 break;
417 420
@@ -732,9 +735,12 @@ xd_append_arg (int dtype, Lisp_Object object, DBusMessageIter *iter)
732 case DBUS_TYPE_STRING: 735 case DBUS_TYPE_STRING:
733 case DBUS_TYPE_OBJECT_PATH: 736 case DBUS_TYPE_OBJECT_PATH:
734 case DBUS_TYPE_SIGNATURE: 737 case DBUS_TYPE_SIGNATURE:
735 /* We dont check the syntax of object path and signature. 738 /* We dont check the syntax of signature. This will be done
736 This will be done by libdbus. */ 739 by libdbus. */
737 CHECK_STRING (object); 740 if (dtype == DBUS_TYPE_OBJECT_PATH)
741 XD_DBUS_VALIDATE_PATH (object)
742 else
743 CHECK_STRING (object);
738 { 744 {
739 /* We need to send a valid UTF-8 string. We could encode `object' 745 /* We need to send a valid UTF-8 string. We could encode `object'
740 but by not encoding it, we guarantee it's valid utf-8, even if 746 but by not encoding it, we guarantee it's valid utf-8, even if