diff options
author | Ralf Habacker <ralf.habacker@freenet.de> | 2022-10-11 18:23:44 +0000 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2022-10-11 18:23:44 +0000 |
commit | b1bc73e61da4e23a05f2d5125613c51b1151f4ed (patch) | |
tree | 1fcc1fd5b3412b355a863ccceb77b2065284fdfe | |
parent | 7cee01fca43b46ea445c6f79516e5e767176630f (diff) | |
parent | f325252e5ee1316b996affe35006289d1324aa2a (diff) | |
download | dbus-b1bc73e61da4e23a05f2d5125613c51b1151f4ed.tar.gz |
Merge branch 'autolaunch-win' into 'master'
Fixes for test-autolaunch-win
See merge request dbus/dbus!363
-rw-r--r-- | test/name-test/test-autolaunch-win.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/test/name-test/test-autolaunch-win.c b/test/name-test/test-autolaunch-win.c index 8a434e2c..30b8353b 100644 --- a/test/name-test/test-autolaunch-win.c +++ b/test/name-test/test-autolaunch-win.c @@ -34,21 +34,6 @@ static int add_wait_time = 0; #define oom() _dbus_test_fatal ("Out of memory") -/** - * helper function - */ -#define _dbus_error_set_from_message_with_location(a, b) __dbus_error_set_from_message_with_location (__FILE__, __LINE__, __FUNCTION__, a, b) - -static void -__dbus_error_set_from_message_with_location (const char *file, int line, const char *function, DBusError *error, DBusMessage *message) -{ - char *str = NULL; - dbus_message_get_args (message, NULL, - DBUS_TYPE_STRING, &str, - DBUS_TYPE_INVALID); - dbus_set_error (error, dbus_message_get_error_name (message), "[%s(%d):%s] %s", file, line, function, str ? str : ""); -} - static dbus_bool_t call_method (DBusConnection *conn, DBusError *error, @@ -71,17 +56,12 @@ call_method (DBusConnection *conn, dbus_message_unref (method); if (reply == NULL) { - dbus_set_error (error, DBUS_ERROR_FAILED, "Got no reply"); result = FALSE; goto out; } - if (dbus_message_get_type (reply) == DBUS_MESSAGE_TYPE_ERROR) - { - _dbus_error_set_from_message_with_location (error, reply); - result = FALSE; - goto out; - } + /* ..._send_with_reply_and_block converts ERROR messages into errors */ + _dbus_assert (dbus_message_get_type (reply) != DBUS_MESSAGE_TYPE_ERROR); result = TRUE; out: |