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