[sysprof/wip/chergert/control-fd] control-fd: cleanup debug logging
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof/wip/chergert/control-fd] control-fd: cleanup debug logging
- Date: Wed, 12 Feb 2020 01:08:19 +0000 (UTC)
commit 766808c5fcd73c4f8833f51a6eba85b43a9299e4
Author: Christian Hergert <chergert redhat com>
Date: Tue Feb 11 17:01:44 2020 -0800
control-fd: cleanup debug logging
src/libsysprof/sysprof-control-source.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/src/libsysprof/sysprof-control-source.c b/src/libsysprof/sysprof-control-source.c
index 190e69b..1094d97 100644
--- a/src/libsysprof/sysprof-control-source.c
+++ b/src/libsysprof/sysprof-control-source.c
@@ -42,6 +42,7 @@ struct _SysprofControlSource
GDBusConnection *conn;
SysprofCaptureWriter *writer;
GPtrArray *files;
+ guint stopped : 1;
};
static void source_iface_init (SysprofSourceInterface *iface);
@@ -95,8 +96,6 @@ on_handle_create_writer_cb (IpcCollector *collector,
g_assert (G_IS_DBUS_METHOD_INVOCATION (invocation));
g_assert (SYSPROF_IS_CONTROL_SOURCE (self));
- g_printerr ("Request for new writer\n");
-
fd = g_mkstemp_full (writer_tmpl, O_RDWR | O_CLOEXEC, 0640);
if (fd > -1)
@@ -109,22 +108,16 @@ on_handle_create_writer_cb (IpcCollector *collector,
if (handle > -1)
{
- g_print ("New fd list with reply %d (fd=%d) %s %p\n", handle, fd, writer_tmpl, out_fd_list);
-
g_ptr_array_add (self->files, g_strdup (writer_tmpl));
ipc_collector_complete_create_writer (collector,
g_steal_pointer (&invocation),
out_fd_list,
g_variant_new_handle (handle));
- g_printerr ("Sent\n");
-
return TRUE;
}
}
- g_printerr ("Womp sending failure\n");
-
if (error != NULL)
g_dbus_method_invocation_return_gerror (g_steal_pointer (&invocation), error);
else
@@ -142,7 +135,7 @@ on_bus_closed_cb (GDBusConnection *connection,
const GError *error,
SysprofControlSource *self)
{
- if (error != NULL)
+ if (!self->stopped && error != NULL)
g_warning ("Bus connection prematurely closed: %s\n", error->message);
}
@@ -246,6 +239,8 @@ sysprof_control_source_stop (SysprofSource *source)
g_assert (SYSPROF_IS_CONTROL_SOURCE (self));
+ self->stopped = TRUE;
+
if (self->conn != NULL)
{
g_dbus_connection_close_sync (self->conn, NULL, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]