From 08079a5bdedd6ec91cda413983e4bd3b6ee0252d Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sat, 16 Sep 2006 15:34:34 +0000 Subject: 2006-09-16 Havoc Pennington MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * dbus/dbus-sysdeps-unix.h: small change to Peter's patch to make dbus-sysdeps-unix-util.c build, add unix-specific sysdeps header. * dbus/dbus-sysdeps.h, dbus-sysdeps-unix.c: patch from Peter Kümmel bug #8249 to make the sysdeps.h read/write/open/close functions specifically for sockets only, and move generic read/write/open/close into unix-specific code. --- bus/bus.c | 8 ++++---- bus/main.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'bus') diff --git a/bus/bus.c b/bus/bus.c index e6f36b14..658271f7 100644 --- a/bus/bus.c +++ b/bus/bus.c @@ -630,7 +630,7 @@ bus_context_new (const DBusString *config_file, } bytes = _dbus_string_get_length (&addr); - if (_dbus_write (print_addr_fd, &addr, 0, bytes) != bytes) + if (_dbus_write_socket (print_addr_fd, &addr, 0, bytes) != bytes) { dbus_set_error (error, DBUS_ERROR_FAILED, "Printing message bus address: %s\n", @@ -640,7 +640,7 @@ bus_context_new (const DBusString *config_file, } if (print_addr_fd > 2) - _dbus_close (print_addr_fd, NULL); + _dbus_close_socket (print_addr_fd, NULL); _dbus_string_free (&addr); } @@ -731,7 +731,7 @@ bus_context_new (const DBusString *config_file, } bytes = _dbus_string_get_length (&pid); - if (_dbus_write (print_pid_fd, &pid, 0, bytes) != bytes) + if (_dbus_write_socket (print_pid_fd, &pid, 0, bytes) != bytes) { dbus_set_error (error, DBUS_ERROR_FAILED, "Printing message bus PID: %s\n", @@ -741,7 +741,7 @@ bus_context_new (const DBusString *config_file, } if (print_pid_fd > 2) - _dbus_close (print_pid_fd, NULL); + _dbus_close_socket (print_pid_fd, NULL); _dbus_string_free (&pid); } diff --git a/bus/main.c b/bus/main.c index adf49470..39bc24f8 100644 --- a/bus/main.c +++ b/bus/main.c @@ -51,7 +51,7 @@ signal_handler (int sig) #endif /* DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX */ case SIGHUP: _dbus_string_init_const (&str, "foo"); - if (!_dbus_write (reload_pipe[RELOAD_WRITE_END], &str, 0, 1)) + if (!_dbus_write_socket (reload_pipe[RELOAD_WRITE_END], &str, 0, 1)) { _dbus_warn ("Unable to write to reload pipe.\n"); exit (1); @@ -150,7 +150,7 @@ handle_reload_watch (DBusWatch *watch, DBusError error; DBusString str; _dbus_string_init (&str); - if (_dbus_read (reload_pipe[RELOAD_READ_END], &str, 1) != 1) + if (_dbus_read_socket (reload_pipe[RELOAD_READ_END], &str, 1) != 1) { _dbus_warn ("Couldn't read from reload pipe.\n"); exit (1); -- cgit