From 1f49c5aaeba5c567a35671dde0e7569098d8ebc6 Mon Sep 17 00:00:00 2001 From: Matthew Leeds Date: Tue, 25 Jun 2019 10:56:29 -0700 Subject: [PATCH] gio: Make minor docs improvements This commit changes a comment in _g_dbus_worker_do_read_cb() to be slightly more useful. At least in my experience debugging an intermittent unit test failure in another project, this failure condition occurred because although g_test_dbus_down() ensures that the session GDBusConnection has exit-on-close set to FALSE before killing its dbus-daemon, there was still a GDBusConnection on the system bus which hit this failed read code path, because we had DBUS_SYSTEM_BUS_ADDRESS set to the address of the #GTestDBus daemon, to appease libudisks. Also, make a few other minor improvements to the docs. --- gio/gdbusconnection.c | 8 ++++---- gio/gdbusprivate.c | 2 +- gio/gtestdbus.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c index 82050204e..26bfc00ac 100644 --- a/gio/gdbusconnection.c +++ b/gio/gdbusconnection.c @@ -128,7 +128,7 @@ * The #GDBusConnection type is used for D-Bus connections to remote * peers such as a message buses. It is a low-level API that offers a * lot of flexibility. For instance, it lets you establish a connection - * over any transport that can by represented as an #GIOStream. + * over any transport that can by represented as a #GIOStream. * * This class is rarely used directly in D-Bus clients. If you are writing * a D-Bus client, it is often easier to use the g_bus_own_name(), @@ -2968,8 +2968,8 @@ g_dbus_connection_new_for_address_sync (const gchar *address, * more details. * * Note that this function should be used with care. Most modern UNIX - * desktops tie the notion of a user session the session bus, and expect - * all of a users applications to quit when their bus connection goes away. + * desktops tie the notion of a user session with the session bus, and expect + * all of a user's applications to quit when their bus connection goes away. * If you are setting @exit_on_close to %FALSE for the shared session * bus connection, you should make sure that your application exits * when the user session ends. @@ -7364,7 +7364,7 @@ bus_get_async_initable_cb (GObject *source_object, * When the operation is finished, @callback will be invoked. You can * then call g_bus_get_finish() to get the result of the operation. * - * This is a asynchronous failable function. See g_bus_get_sync() for + * This is an asynchronous failable function. See g_bus_get_sync() for * the synchronous version. * * Since: 2.26 diff --git a/gio/gdbusprivate.c b/gio/gdbusprivate.c index 488fe50c4..0421ca56c 100644 --- a/gio/gdbusprivate.c +++ b/gio/gdbusprivate.c @@ -701,7 +701,7 @@ _g_dbus_worker_do_read_cb (GInputStream *input_stream, worker); #endif - /* TODO: hmm, hmm... */ + /* The read failed, which could mean the dbus-daemon was sent SIGTERM. */ if (bytes_read == 0) { g_set_error (&error, diff --git a/gio/gtestdbus.c b/gio/gtestdbus.c index 2fc2d51f5..99c9cf8ea 100644 --- a/gio/gtestdbus.c +++ b/gio/gtestdbus.c @@ -801,7 +801,7 @@ g_test_dbus_stop (GTestDBus *self) * Stop the session bus started by g_test_dbus_up(). * * This will wait for the singleton returned by g_bus_get() or g_bus_get_sync() - * is destroyed. This is done to ensure that the next unit test won't get a + * to be destroyed. This is done to ensure that the next unit test won't get a * leaked singleton from this test. */ void