From 104fc578262f4dffce7597e8535af5d2370517c0 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Fri, 6 Mar 2015 08:09:57 +0100 Subject: [PATCH] Rename _dbus_full_duplex_pipe() to more descriptive name _dbus_socketpair(). Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89444 --- bus/main.c | 4 ++-- dbus/dbus-server-debug-pipe.c | 3 +-- dbus/dbus-spawn.c | 2 +- dbus/dbus-sysdeps-unix.c | 14 +++++++------- dbus/dbus-sysdeps.h | 8 ++++---- 5 files changed, 15 insertions(+), 16 deletions(-) diff --git a/bus/main.c b/bus/main.c index ad02b97..267a508 100644 --- a/bus/main.c +++ b/bus/main.c @@ -313,8 +313,8 @@ setup_reload_pipe (DBusLoop *loop) dbus_error_init (&error); - if (!_dbus_full_duplex_pipe (&reload_pipe[0], &reload_pipe[1], - TRUE, &error)) + if (!_dbus_socketpair (&reload_pipe[0], &reload_pipe[1], + TRUE, &error)) { _dbus_warn ("Unable to create reload pipe: %s\n", error.message); diff --git a/dbus/dbus-server-debug-pipe.c b/dbus/dbus-server-debug-pipe.c index 8f5ff5f..32d62dd 100644 --- a/dbus/dbus-server-debug-pipe.c +++ b/dbus/dbus-server-debug-pipe.c @@ -246,8 +246,7 @@ _dbus_transport_debug_pipe_new (const char *server_name, return NULL; } - if (!_dbus_full_duplex_pipe (&client_fd, &server_fd, FALSE, - NULL)) + if (!_dbus_socketpair (&client_fd, &server_fd, FALSE, NULL)) { _dbus_verbose ("failed to create full duplex pipe\n"); dbus_set_error (error, DBUS_ERROR_FAILED, "Could not create full-duplex pipe"); diff --git a/dbus/dbus-spawn.c b/dbus/dbus-spawn.c index 959c184..86161e9 100644 --- a/dbus/dbus-spawn.c +++ b/dbus/dbus-spawn.c @@ -1258,7 +1258,7 @@ _dbus_spawn_async_with_babysitter (DBusBabysitter **sitter_p, if (!make_pipe (child_err_report_pipe, error)) goto cleanup_and_fail; - if (!_dbus_full_duplex_pipe (&babysitter_pipe[0], &babysitter_pipe[1], TRUE, error)) + if (!_dbus_socketpair (&babysitter_pipe[0], &babysitter_pipe[1], TRUE, error)) goto cleanup_and_fail; /* Setting up the babysitter is only useful in the parent, diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c index 3f60671..ec0c1d1 100644 --- a/dbus/dbus-sysdeps-unix.c +++ b/dbus/dbus-sysdeps-unix.c @@ -3275,22 +3275,22 @@ _dbus_print_backtrace (void) } /** - * Creates a full-duplex pipe (as in socketpair()). - * Sets both ends of the pipe nonblocking. + * Creates pair of connect sockets (as in socketpair()). + * Sets both ends of the pair nonblocking. * * Marks both file descriptors as close-on-exec * * @param fd1 return location for one end * @param fd2 return location for the other end - * @param blocking #TRUE if pipe should be blocking + * @param blocking #TRUE if pair should be blocking * @param error error return * @returns #FALSE on failure (if error is set) */ dbus_bool_t -_dbus_full_duplex_pipe (int *fd1, - int *fd2, - dbus_bool_t blocking, - DBusError *error) +_dbus_socketpair (int *fd1, + int *fd2, + dbus_bool_t blocking, + DBusError *error) { #ifdef HAVE_SOCKETPAIR int fds[2]; diff --git a/dbus/dbus-sysdeps.h b/dbus/dbus-sysdeps.h index 2dbc420..bbbf708 100644 --- a/dbus/dbus-sysdeps.h +++ b/dbus/dbus-sysdeps.h @@ -438,10 +438,10 @@ dbus_bool_t _dbus_stat (const DBusString *filename, DBusStat *statbuf, DBusError *error); DBUS_PRIVATE_EXPORT -dbus_bool_t _dbus_full_duplex_pipe (int *fd1, - int *fd2, - dbus_bool_t blocking, - DBusError *error); +dbus_bool_t _dbus_socketpair (int *fd1, + int *fd2, + dbus_bool_t blocking, + DBusError *error); void _dbus_print_backtrace (void); -- 1.8.4.5