From ee51364bd71b0867f708950332b2f0fd3bf77088 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Thu, 8 Mar 2007 20:25:15 +0000 Subject: * bus/bus.c, dbus/dbus-sysdeps-unix.c, dbus/dbus-sysdeps.h: rename pipe related write() function calls to _dbus_write_pipe(). --- ChangeLog | 5 +++++ bus/bus.c | 4 ++-- dbus/dbus-sysdeps-unix.c | 9 +++++++++ dbus/dbus-sysdeps.h | 6 ++++++ 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a6b6b1f3..a281126e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-03-08 Ralf Habacker + + * bus/bus.c, dbus/dbus-sysdeps-unix.c, dbus/dbus-sysdeps.h: + rename pipe related write() function calls to _dbus_write_pipe(). + 2007-03-08 Ralf Habacker * dbus-win.patch: added bus/config-loader-libexpat.c patch, diff --git a/bus/bus.c b/bus/bus.c index 26f91adb..020ac546 100644 --- a/bus/bus.c +++ b/bus/bus.c @@ -625,7 +625,7 @@ bus_context_new (const DBusString *config_file, } bytes = _dbus_string_get_length (&addr); - if (_dbus_write_socket (print_addr_fd, &addr, 0, bytes) != bytes) + if (_dbus_write_pipe (print_addr_fd, &addr, 0, bytes) != bytes) { dbus_set_error (error, DBUS_ERROR_FAILED, "Printing message bus address: %s\n", @@ -726,7 +726,7 @@ bus_context_new (const DBusString *config_file, } bytes = _dbus_string_get_length (&pid); - if (_dbus_write_socket (print_pid_fd, &pid, 0, bytes) != bytes) + if (_dbus_write_pipe (print_pid_fd, &pid, 0, bytes) != bytes) { dbus_set_error (error, DBUS_ERROR_FAILED, "Printing message bus PID: %s\n", diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c index ebb269c1..23296712 100644 --- a/dbus/dbus-sysdeps-unix.c +++ b/dbus/dbus-sysdeps-unix.c @@ -169,6 +169,15 @@ _dbus_write_socket (int fd, return _dbus_write (fd, buffer, start, len); } +int +_dbus_write_pipe (DBusPipe pipe, + const DBusString *buffer, + int start, + int len) +{ + return _dbus_write (pipe, buffer, start, len); +} + /** * Like _dbus_write_two() but only works on sockets and is thus * available on Windows. diff --git a/dbus/dbus-sysdeps.h b/dbus/dbus-sysdeps.h index 9bc91186..8ca1cad9 100644 --- a/dbus/dbus-sysdeps.h +++ b/dbus/dbus-sysdeps.h @@ -302,6 +302,12 @@ dbus_bool_t _dbus_path_is_absolute (const DBusString *filename); dbus_bool_t _dbus_get_standard_session_servicedirs (DBusList **dirs); +typedef int DBusPipe; +int _dbus_write_pipe (DBusPipe pipe, + const DBusString *buffer, + int start, + int len); + /** Opaque type for reading a directory listing */ typedef struct DBusDirIter DBusDirIter; -- cgit