From 34911984cf9821dbc470da669057b50171f5cdd6 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 12 Mar 2015 18:29:40 +0000 Subject: [PATCH 06/11] main: reload_pipe is (despite its name) a socket pair --- bus/main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bus/main.c b/bus/main.c index 0c27b66..d9b9a8d 100644 --- a/bus/main.c +++ b/bus/main.c @@ -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 */ -- 2.1.4