diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2016-03-15 15:41:55 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2016-03-15 15:41:55 -0500 |
commit | df322a475939f3d30e4ff20213df1c01f7ff26d5 (patch) | |
tree | ddc88c7c5b09870070c31db7bcbb86eff5bac2c9 /src | |
parent | 4aeb345821bad91430fe9cdb7244c1135051bd92 (diff) | |
download | ayatana-indicator-display-df322a475939f3d30e4ff20213df1c01f7ff26d5.tar.gz ayatana-indicator-display-df322a475939f3d30e4ff20213df1c01f7ff26d5.tar.bz2 ayatana-indicator-display-df322a475939f3d30e4ff20213df1c01f7ff26d5.zip |
add some debug stubs
Diffstat (limited to 'src')
-rw-r--r-- | src/adbd-client.cpp | 6 | ||||
-rw-r--r-- | src/main.cpp | 3 |
2 files changed, 7 insertions, 2 deletions
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); |