From de725a91e4806545c32989c3dbfc97778d2b79c5 Mon Sep 17 00:00:00 2001 From: Benjamin Berg Date: Fri, 11 Dec 2020 15:45:47 +0100 Subject: [PATCH] verify: Print message about verification start from callback It seems that GLib may process multiple DBus signals in one mainloop iteration. This could cause messages to be re-ordered, which in turn caused a race condition in the CI that could trigger random failures. --- utils/verify.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/utils/verify.c b/utils/verify.c index 8e82e03..fc0372b 100644 --- a/utils/verify.c +++ b/utils/verify.c @@ -160,7 +160,10 @@ verify_started_cb (GObject *obj, struct VerifyState *verify_state = user_data; if (fprint_dbus_device_call_verify_start_finish (FPRINT_DBUS_DEVICE (obj), res, &verify_state->error)) - verify_state->started = TRUE; + { + g_print ("Verify started!\n"); + verify_state->started = TRUE; + } } static void @@ -226,7 +229,6 @@ do_verify (FprintDBusDevice *dev) g_clear_error (&verify_state.error); exit (1); } - g_print ("Verify started!\n"); /* VerifyStatus signals are processing, wait for completion. */ while (!verify_state.completed)