From 64367a58c06a218249026a97245716310483b090 Mon Sep 17 00:00:00 2001 From: Kouhei Sutou Date: Thu, 15 Jan 2015 21:44:50 +0900 Subject: [PATCH 2/4] test: ensure dropping source ID when callback is removed by itself Signed-off-by: HAYASHI Kentaro --- test/gcutter/test-gcut-string-io-channel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/gcutter/test-gcut-string-io-channel.c b/test/gcutter/test-gcut-string-io-channel.c index 769fa47..6bd2f23 100644 --- a/test/gcutter/test-gcut-string-io-channel.c +++ b/test/gcutter/test-gcut-string-io-channel.c @@ -1,6 +1,6 @@ /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* - * Copyright (C) 2008-2011 Kouhei Sutou + * Copyright (C) 2008-2015 Kouhei Sutou * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -254,6 +254,7 @@ cb_timeout_detect (gpointer user_data) *timed_out = TRUE; limit = gcut_string_io_channel_get_buffer_limit(channel); gcut_string_io_channel_set_buffer_limit(channel, limit + 1); + timeout_id = 0; return FALSE; } @@ -361,6 +362,7 @@ cb_timeout (gpointer data) *emitted = TRUE; gcut_string_io_channel_set_limit(channel, 0); + timeout_id = 0; return FALSE; } -- 2.1.0