diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2015-03-12 18:29:40 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2015-05-12 18:34:56 +0100 |
commit | 378e01c0d04fa9bc4a5a2f725ac332acf83793af (patch) | |
tree | 8b7138a01488feb6e3f687f54d53c34026d8bea0 | |
parent | 520802f8c2b7756aeda1cca6a6ee55ddf4c23e30 (diff) | |
download | dbus-378e01c0d04fa9bc4a5a2f725ac332acf83793af.tar.gz |
main: reload_pipe is (despite its name) a socket pair
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89444
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
-rw-r--r-- | bus/main.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -45,7 +45,9 @@ static BusContext *context; #ifdef DBUS_UNIX -static int reload_pipe[2]; +/* Despite its name and its unidirectional nature, this is actually + * a socket pair. */ +static DBusSocket reload_pipe[2]; #define RELOAD_READ_END 0 #define RELOAD_WRITE_END 1 @@ -353,10 +355,10 @@ close_reload_pipe (DBusWatch **watch) *watch = NULL; _dbus_close_socket (reload_pipe[RELOAD_READ_END], NULL); - reload_pipe[RELOAD_READ_END] = -1; + DBUS_SOCKET_INVALIDATE (reload_pipe[RELOAD_READ_END]); _dbus_close_socket (reload_pipe[RELOAD_WRITE_END], NULL); - reload_pipe[RELOAD_WRITE_END] = -1; + DBUS_SOCKET_INVALIDATE (reload_pipe[RELOAD_WRITE_END]); } #endif /* DBUS_UNIX */ |