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.
This commit is contained in:
Benjamin Berg
2020-12-11 15:45:47 +01:00
parent 18392cba54
commit de725a91e4

View File

@ -160,7 +160,10 @@ verify_started_cb (GObject *obj,
struct VerifyState *verify_state = user_data; struct VerifyState *verify_state = user_data;
if (fprint_dbus_device_call_verify_start_finish (FPRINT_DBUS_DEVICE (obj), res, &verify_state->error)) 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 static void
@ -226,7 +229,6 @@ do_verify (FprintDBusDevice *dev)
g_clear_error (&verify_state.error); g_clear_error (&verify_state.error);
exit (1); exit (1);
} }
g_print ("Verify started!\n");
/* VerifyStatus signals are processing, wait for completion. */ /* VerifyStatus signals are processing, wait for completion. */
while (!verify_state.completed) while (!verify_state.completed)