diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2020-10-29 16:56:40 +0100 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2020-10-29 16:56:40 +0100 |
commit | 372739b4069dee1911606817cf962b6ff8b49bac (patch) | |
tree | 767691f795641c7f9622a8bedfb921e05f3e2aed /src | |
parent | f5e080fb1f90f74cd43ff1fa46280a107fbf7757 (diff) | |
download | emacs-372739b4069dee1911606817cf962b6ff8b49bac.tar.gz |
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.c | 18 |
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) case DBUS_TYPE_STRING: case DBUS_TYPE_OBJECT_PATH: case DBUS_TYPE_SIGNATURE: - /* We dont check the syntax of object path and signature. This - will be done by libdbus. */ - CHECK_STRING (object); + /* We dont check the syntax of signature. This will be done by + libdbus. */ + if (dtype == DBUS_TYPE_OBJECT_PATH) + XD_DBUS_VALIDATE_PATH (object) + else + CHECK_STRING (object); sprintf (signature, "%c", dtype); break; @@ -732,9 +735,12 @@ xd_append_arg (int dtype, Lisp_Object object, DBusMessageIter *iter) case DBUS_TYPE_STRING: case DBUS_TYPE_OBJECT_PATH: case DBUS_TYPE_SIGNATURE: - /* We dont check the syntax of object path and signature. - This will be done by libdbus. */ - CHECK_STRING (object); + /* We dont check the syntax of signature. This will be done + by libdbus. */ + if (dtype == DBUS_TYPE_OBJECT_PATH) + XD_DBUS_VALIDATE_PATH (object) + else + CHECK_STRING (object); { /* We need to send a valid UTF-8 string. We could encode `object' but by not encoding it, we guarantee it's valid utf-8, even if |