Sun Nov 6 Soeren Sandmann <sandmann@redhat.com>

Sun Nov  6  Soeren Sandmann  <sandmann@redhat.com>

        * TODO: updates

        * collector.c (on_read): Only call back when a new sample actually
        arrived.

        * collector.c (collector_stop): close the filedescriptor

        * sysprof.c (on_start_toggled): Change sense of test.

        * sysprof.c (ensure_profile): Stop the collector.

        * sysprof.c (on_reset_clicked): Stop the collector when state
        becomes INITIAL.
This commit is contained in:
Søren Sandmann Pedersen
2005-11-07 02:27:55 +00:00
parent 64b2627c4a
commit fe5dd1e1fa
4 changed files with 58 additions and 24 deletions

View File

@ -138,10 +138,10 @@ on_read (gpointer data)
add_trace_to_stash (&trace, collector->stash);
collector->n_samples++;
}
if (collector->callback)
collector->callback (collector->data);
if (collector->callback)
collector->callback (collector->data);
}
}
static gboolean
@ -205,7 +205,13 @@ collector_start (Collector *collector,
void
collector_stop (Collector *collector)
{
fd_set_read_callback (collector->fd, NULL);
if (collector->fd >= 0)
{
fd_remove_watch (collector->fd);
close (collector->fd);
collector->fd = -1;
}
}
void