diff options
| author | Andrea Corallo | 2020-09-06 08:07:30 +0200 |
|---|---|---|
| committer | Andrea Corallo | 2020-09-06 08:07:30 +0200 |
| commit | 805563346613af1f13ecd1bf96ffd8efe4816b47 (patch) | |
| tree | 568434f474dd247c732f096e9e3c6e23c493a1b7 /src/dbusbind.c | |
| parent | 67c53691560616598f746491347bd223480e6172 (diff) | |
| parent | 669b46e6a39bb5ba5d2ed14baebd585af6130ec9 (diff) | |
| download | emacs-805563346613af1f13ecd1bf96ffd8efe4816b47.tar.gz emacs-805563346613af1f13ecd1bf96ffd8efe4816b47.zip | |
Merge remote-tracking branch 'savannah/master' into HEAD
Diffstat (limited to 'src/dbusbind.c')
| -rw-r--r-- | src/dbusbind.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/dbusbind.c b/src/dbusbind.c index f6a0879e6a9..4fce92521a4 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c | |||
| @@ -1261,6 +1261,7 @@ usage: (dbus-message-internal &rest REST) */) | |||
| 1261 | Lisp_Object path = Qnil; | 1261 | Lisp_Object path = Qnil; |
| 1262 | Lisp_Object interface = Qnil; | 1262 | Lisp_Object interface = Qnil; |
| 1263 | Lisp_Object member = Qnil; | 1263 | Lisp_Object member = Qnil; |
| 1264 | Lisp_Object error_name = Qnil; | ||
| 1264 | Lisp_Object result; | 1265 | Lisp_Object result; |
| 1265 | DBusConnection *connection; | 1266 | DBusConnection *connection; |
| 1266 | DBusMessage *dmessage; | 1267 | DBusMessage *dmessage; |
| @@ -1298,7 +1299,9 @@ usage: (dbus-message-internal &rest REST) */) | |||
| 1298 | else /* DBUS_MESSAGE_TYPE_METHOD_RETURN, DBUS_MESSAGE_TYPE_ERROR */ | 1299 | else /* DBUS_MESSAGE_TYPE_METHOD_RETURN, DBUS_MESSAGE_TYPE_ERROR */ |
| 1299 | { | 1300 | { |
| 1300 | serial = xd_extract_unsigned (args[3], TYPE_MAXIMUM (dbus_uint32_t)); | 1301 | serial = xd_extract_unsigned (args[3], TYPE_MAXIMUM (dbus_uint32_t)); |
| 1301 | count = 4; | 1302 | if (mtype == DBUS_MESSAGE_TYPE_ERROR) |
| 1303 | error_name = args[4]; | ||
| 1304 | count = (mtype == DBUS_MESSAGE_TYPE_ERROR) ? 5 : 4; | ||
| 1302 | } | 1305 | } |
| 1303 | 1306 | ||
| 1304 | /* Check parameters. */ | 1307 | /* Check parameters. */ |
| @@ -1341,13 +1344,22 @@ usage: (dbus-message-internal &rest REST) */) | |||
| 1341 | XD_OBJECT_TO_STRING (interface), | 1344 | XD_OBJECT_TO_STRING (interface), |
| 1342 | XD_OBJECT_TO_STRING (member)); | 1345 | XD_OBJECT_TO_STRING (member)); |
| 1343 | break; | 1346 | break; |
| 1344 | default: /* DBUS_MESSAGE_TYPE_METHOD_RETURN, DBUS_MESSAGE_TYPE_ERROR */ | 1347 | case DBUS_MESSAGE_TYPE_METHOD_RETURN: |
| 1345 | ui_serial = serial; | 1348 | ui_serial = serial; |
| 1346 | XD_DEBUG_MESSAGE ("%s %s %s %u", | 1349 | XD_DEBUG_MESSAGE ("%s %s %s %u", |
| 1347 | XD_MESSAGE_TYPE_TO_STRING (mtype), | 1350 | XD_MESSAGE_TYPE_TO_STRING (mtype), |
| 1348 | XD_OBJECT_TO_STRING (bus), | 1351 | XD_OBJECT_TO_STRING (bus), |
| 1349 | XD_OBJECT_TO_STRING (service), | 1352 | XD_OBJECT_TO_STRING (service), |
| 1350 | ui_serial); | 1353 | ui_serial); |
| 1354 | break; | ||
| 1355 | default: /* DBUS_MESSAGE_TYPE_ERROR */ | ||
| 1356 | ui_serial = serial; | ||
| 1357 | XD_DEBUG_MESSAGE ("%s %s %s %u %s", | ||
| 1358 | XD_MESSAGE_TYPE_TO_STRING (mtype), | ||
| 1359 | XD_OBJECT_TO_STRING (bus), | ||
| 1360 | XD_OBJECT_TO_STRING (service), | ||
| 1361 | ui_serial, | ||
| 1362 | XD_OBJECT_TO_STRING (error_name)); | ||
| 1351 | } | 1363 | } |
| 1352 | 1364 | ||
| 1353 | /* Retrieve bus address. */ | 1365 | /* Retrieve bus address. */ |
| @@ -1406,7 +1418,7 @@ usage: (dbus-message-internal &rest REST) */) | |||
| 1406 | XD_SIGNAL1 (build_string ("Unable to create a return message")); | 1418 | XD_SIGNAL1 (build_string ("Unable to create a return message")); |
| 1407 | 1419 | ||
| 1408 | if ((mtype == DBUS_MESSAGE_TYPE_ERROR) | 1420 | if ((mtype == DBUS_MESSAGE_TYPE_ERROR) |
| 1409 | && (!dbus_message_set_error_name (dmessage, DBUS_ERROR_FAILED))) | 1421 | && (!dbus_message_set_error_name (dmessage, SSDATA (error_name)))) |
| 1410 | XD_SIGNAL1 (build_string ("Unable to create an error message")); | 1422 | XD_SIGNAL1 (build_string ("Unable to create an error message")); |
| 1411 | } | 1423 | } |
| 1412 | 1424 | ||