From df322a475939f3d30e4ff20213df1c01f7ff26d5 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 15 Mar 2016 15:41:55 -0500 Subject: add some debug stubs --- src/adbd-client.cpp | 6 ++++-- src/main.cpp | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/adbd-client.cpp b/src/adbd-client.cpp index 30929a7..4f7d28f 100644 --- a/src/adbd-client.cpp +++ b/src/adbd-client.cpp @@ -119,7 +119,7 @@ private: while (!g_cancellable_is_cancelled(m_cancellable)) { - g_debug("%s creating a client socket", G_STRLOC); + g_debug("%s creating a client socket to '%s'", G_STRLOC, socket_path.c_str()); auto socket = create_client_socket(socket_path); bool got_valid_req = false; @@ -179,9 +179,11 @@ private: } auto address = g_unix_socket_address_new(socket_path.c_str()); - const auto connected = g_socket_connect(socket, address, m_cancellable, nullptr); + const auto connected = g_socket_connect(socket, address, m_cancellable, &error); g_clear_object(&address); if (!connected) { + g_debug("unable to connect to '%s': %s", socket_path.c_str(), error->message); + g_clear_error(&error); g_clear_object(&socket); return nullptr; } diff --git a/src/main.cpp b/src/main.cpp index eb1bb2c..2e84afa 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -29,6 +29,9 @@ int main(int /*argc*/, char** /*argv*/) { +#warning temp +g_assert(g_setenv("G_MESSAGES_DEBUG", "all", true)); + // Work around a deadlock in glib's type initialization. // It can be removed when https://bugzilla.gnome.org/show_bug.cgi?id=674885 is fixed. g_type_ensure(G_TYPE_DBUS_CONNECTION); -- cgit v1.2.3