mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
fp-image: Do not start thread detection task thread if already running
This commit is contained in:
@@ -474,8 +474,11 @@ fp_image_detect_minutiae (FpImage *self,
|
|||||||
|
|
||||||
if (!g_atomic_int_compare_and_exchange (&self->detection_in_progress,
|
if (!g_atomic_int_compare_and_exchange (&self->detection_in_progress,
|
||||||
FALSE, TRUE))
|
FALSE, TRUE))
|
||||||
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_ADDRESS_IN_USE,
|
{
|
||||||
"Minutiae detection is already in progress");
|
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_ADDRESS_IN_USE,
|
||||||
|
"Minutiae detection is already in progress");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
g_task_run_in_thread (g_steal_pointer (&task),
|
g_task_run_in_thread (g_steal_pointer (&task),
|
||||||
fp_image_detect_minutiae_nbis_thread_func);
|
fp_image_detect_minutiae_nbis_thread_func);
|
||||||
|
|||||||
Reference in New Issue
Block a user