do NOT call g_source_remove twice, NEVER

This commit is contained in:
Thomas Debesse 2014-10-11 21:50:13 +02:00
parent 54ea248c79
commit 4553122053

View File

@ -80,8 +80,9 @@ static void stat_free_conn (struct stat_conn *conn) {
job->cons = g_slist_remove (job->cons, conn); job->cons = g_slist_remove (job->cons, conn);
if (conn->fd >= 0) { if (conn->fd >= 0) {
printf("free:g_source_remove: %p\n", conn->tag);
g_source_remove (conn->tag); g_source_remove (conn->tag);
// conn->tag = NULL; ? conn->tag = NULL;
close (conn->fd); close (conn->fd);
// conn->chan ? // conn->chan ?
@ -921,8 +922,6 @@ static gboolean stat_servers_input_callback (GIOChannel *chan,
if (conn->buf[conn->lastnl] == '\0') { if (conn->buf[conn->lastnl] == '\0') {
blocked = TRUE; blocked = TRUE;
g_source_remove (conn->tag);
// conn->tag = NULL; ?
parse_qstat_record (conn); parse_qstat_record (conn);
@ -955,6 +954,7 @@ static gboolean stat_servers_input_callback (GIOChannel *chan,
} }
if (blocked) { if (blocked) {
printf("blocked:g_source_remove: %p\n", conn->tag);
g_source_remove (conn->tag); g_source_remove (conn->tag);
// conn->tag = NULL; ? // conn->tag = NULL; ?