Annotate all custom GIO GSource using g_source_set_name

Naming the sources allows easier debugging with e.g. SystemTap
probes.

https://bugzilla.gnome.org/show_bug.cgi?id=620536
This commit is contained in:
Colin Walters
2010-07-10 20:09:34 -04:00
committed by Matthias Clasen
parent 7568bb66f9
commit d2fe46b476
6 changed files with 6 additions and 0 deletions

View File

@@ -2401,6 +2401,7 @@ socket_source_new (GSocket *socket,
condition |= G_IO_HUP | G_IO_ERR;
source = g_source_new (&socket_source_funcs, sizeof (GSocketSource));
g_source_set_name (source, "GSocket");
socket_source = (GSocketSource *)source;
socket_source->socket = g_object_ref (socket);