From: Simon McVittie Date: Thu, 12 Mar 2015 14:29:38 +0000 (+0000) Subject: bus_unix_fds_passing_test: the results of _dbus_socketpair are sockets X-Git-Tag: dbus-1.9.16~25 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=064884f977a656c877d1ab3622860917f04ea2be;p=thirdparty%2Fdbus.git 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 --- diff --git a/bus/dispatch.c b/bus/dispatch.c index feeaec5ef..10b3acf13 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");