]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
main: reload_pipe is (despite its name) a socket pair
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 12 Mar 2015 18:29:40 +0000 (18:29 +0000)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Tue, 12 May 2015 17:34:56 +0000 (18:34 +0100)
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89444
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
bus/main.c

index 0c27b667df731844007bd5e1e71022635df7e625..d9b9a8d1cf40ae5057ed369223f05426d101002e 100644 (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 */