diff options
author | Ralf Habacker <ralf.habacker@freenet.de> | 2007-03-10 09:10:36 +0000 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2007-03-10 09:10:36 +0000 |
commit | 47e318a6e1893069e1326945ce1af25ddf8201d1 (patch) | |
tree | aae5bbc914c095d75ce7c40712d89ac847002e00 /bus/bus.c | |
parent | f3fd4d60ad5de9f0c6576f6e100f944792fed255 (diff) |
* bus/bus.c, bus/bus.h, bus/main.c, bus/test.c, dbus/dbus-sysdeps-unix.c, dbus/dbus-sysdeps-util-unix.c, dbus/dbus-sysdeps-util-win.c, bus/dbus-sysdeps-win.c,dbus/dbus-sysdeps.h: renamed _dbus_xxx_pipe to _dbus_pipe_xxx, completed _dbus_pipe support.
Diffstat (limited to 'bus/bus.c')
-rw-r--r-- | bus/bus.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -527,8 +527,8 @@ process_config_postinit (BusContext *context, BusContext* bus_context_new (const DBusString *config_file, ForceForkSetting force_fork, - int print_addr_fd, - int print_pid_fd, + DBusPipe print_addr_fd, + DBusPipe print_pid_fd, DBusError *error) { BusContext *context; @@ -603,7 +603,7 @@ bus_context_new (const DBusString *config_file, * other random thing. But I think the answer is "don't do * that then" */ - if (print_addr_fd >= 0) + if (_dbus_pipe_is_valid(print_addr_fd)) { DBusString addr; const char *a = bus_context_get_address (context); @@ -625,7 +625,7 @@ bus_context_new (const DBusString *config_file, } bytes = _dbus_string_get_length (&addr); - if (_dbus_write_pipe (print_addr_fd, &addr, 0, bytes) != bytes) + if (_dbus_pipe_write(print_addr_fd, &addr, 0, bytes) != bytes) { dbus_set_error (error, DBUS_ERROR_FAILED, "Printing message bus address: %s\n", @@ -634,8 +634,8 @@ bus_context_new (const DBusString *config_file, goto failed; } - if (print_addr_fd > 2) - _dbus_close_socket (print_addr_fd, NULL); + if (_dbus_pipe_is_special(print_addr_fd)) + _dbus_pipe_close(print_addr_fd, NULL); _dbus_string_free (&addr); } @@ -706,7 +706,7 @@ bus_context_new (const DBusString *config_file, } /* Write PID if requested */ - if (print_pid_fd >= 0) + if (_dbus_pipe_is_valid(print_pid_fd)) { DBusString pid; int bytes; @@ -726,7 +726,7 @@ bus_context_new (const DBusString *config_file, } bytes = _dbus_string_get_length (&pid); - if (_dbus_write_pipe (print_pid_fd, &pid, 0, bytes) != bytes) + if (_dbus_pipe_write (print_pid_fd, &pid, 0, bytes) != bytes) { dbus_set_error (error, DBUS_ERROR_FAILED, "Printing message bus PID: %s\n", @@ -735,8 +735,8 @@ bus_context_new (const DBusString *config_file, goto failed; } - if (print_pid_fd > 2) - _dbus_close_socket (print_pid_fd, NULL); + if (_dbus_pipe_is_special (print_pid_fd)) + _dbus_pipe_close (print_pid_fd, NULL); _dbus_string_free (&pid); } |