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>
This commit is contained in:
Simon McVittie 2015-03-12 18:29:40 +00:00
parent 520802f8c2
commit 378e01c0d0

View file

@ -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 */