summaryrefslogtreecommitdiff
path: root/gio/tests/gdbus-connection-slow.c
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2023-05-09 12:50:39 +0000
committerPhilip Withnall <philip@tecnocode.co.uk>2023-05-09 12:50:39 +0000
commit63e1e83c339aab6f2c48f6bb6a68fc6197510ce9 (patch)
treeae16808bddf04eac9b5c0b4cc542874955e5b5c8 /gio/tests/gdbus-connection-slow.c
parent061881afbad140a2db94e892a82281078d017617 (diff)
parente25a4f995fdabd29e769ad75fe0edc8d274c01da (diff)
downloadglib-63e1e83c339aab6f2c48f6bb6a68fc6197510ce9.tar.gz
Merge branch 'wip/p3732/timeout-seconds-once' into 'main'
add g_timeout_add_seconds_once See merge request GNOME/glib!3383
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",