diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2015-03-12 14:29:38 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2015-05-12 18:33:50 +0100 |
commit | 064884f977a656c877d1ab3622860917f04ea2be (patch) | |
tree | 79a788ea957ea28e751cab7d9ae4009f9c088b98 | |
parent | ede75686ff6ee7d82119a25e746ee042ceef2aeb (diff) | |
download | dbus-064884f977a656c877d1ab3622860917f04ea2be.tar.gz |
bus_unix_fds_passing_test: the results of _dbus_socketpair are sockets
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89444
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
-rw-r--r-- | bus/dispatch.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/bus/dispatch.c b/bus/dispatch.c index feeaec5e..10b3acf1 100644 --- a/bus/dispatch.c +++ b/bus/dispatch.c @@ -5018,7 +5018,8 @@ bus_unix_fds_passing_test(const DBusString *test_data_dir) DBusConnection *foo, *bar; DBusError error; DBusMessage *m; - int one[2], two[2], x, y, z; + DBusSocket one[2], two[2]; + int x, y, z; char r; dbus_error_init (&error); @@ -5073,9 +5074,9 @@ bus_unix_fds_passing_test(const DBusString *test_data_dir) DBUS_TYPE_INVALID)) _dbus_assert_not_reached("Failed to attach fds."); - if (!_dbus_close(one[0], &error)) + if (!_dbus_close_socket (one[0], &error)) _dbus_assert_not_reached("Failed to close pipe #1 "); - if (!_dbus_close(two[0], &error)) + if (!_dbus_close_socket (two[0], &error)) _dbus_assert_not_reached("Failed to close pipe #2 "); if (!(dbus_connection_can_send_type(foo, DBUS_TYPE_UNIX_FD))) @@ -5142,9 +5143,9 @@ bus_unix_fds_passing_test(const DBusString *test_data_dir) if (read(two[1], &r, 1) != 1 || r != 'Z') _dbus_assert_not_reached("Failed to read value from pipe."); - if (!_dbus_close(one[1], &error)) + if (!_dbus_close_socket (one[1], &error)) _dbus_assert_not_reached("Failed to close pipe #1 "); - if (!_dbus_close(two[1], &error)) + if (!_dbus_close_socket (two[1], &error)) _dbus_assert_not_reached("Failed to close pipe #2 "); _dbus_verbose ("Disconnecting foo\n"); |