summaryrefslogtreecommitdiff
path: root/gio/tests/gdbus-connection-slow.c
diff options
context:
space:
mode:
Diffstat (limited to 'gio/tests/gdbus-connection-slow.c')
-rw-r--r--gio/tests/gdbus-connection-slow.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gio/tests/gdbus-connection-slow.c b/gio/tests/gdbus-connection-slow.c
index 5a3479234..06f59493c 100644
--- a/gio/tests/gdbus-connection-slow.c
+++ b/gio/tests/gdbus-connection-slow.c
@@ -128,14 +128,12 @@ test_connection_flush (void)
/* the test will fail if the service name has not appeared after this amount of seconds */
#define LARGE_MESSAGE_TIMEOUT_SECONDS 10
-static gboolean
+static void
large_message_timeout_cb (gpointer data)
{
(void)data;
g_error ("Error: timeout waiting for dbus name to appear");
-
- return G_SOURCE_REMOVE;
}
static void
@@ -200,9 +198,9 @@ test_connection_large_message (void)
/* this is safe; testserver will exit once the bus goes away */
g_assert (g_spawn_command_line_async (g_test_get_filename (G_TEST_BUILT, "gdbus-testserver", NULL), NULL));
- timeout_id = g_timeout_add_seconds (LARGE_MESSAGE_TIMEOUT_SECONDS,
- large_message_timeout_cb,
- NULL);
+ timeout_id = g_timeout_add_seconds_once (LARGE_MESSAGE_TIMEOUT_SECONDS,
+ large_message_timeout_cb,
+ NULL);
watcher_id = g_bus_watch_name (G_BUS_TYPE_SESSION,
"com.example.TestService",