mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
print: Fix match error propagation
The FPI_MATCH_ERROR constant was set to 0, however it is propagated to the task completion using g_task_propagate_int. As g_task_propagate_int will always return -1 on error, we either need to add an explicit -1 check or we just need to match the semantics. Change the constant to -1, also rearange FP_MATCH_SUCCESS so that it does not end up being 0.
This commit is contained in:
committed by
Marco Trevisan
parent
f404a69b73
commit
6209b22e3b
@@ -21,13 +21,13 @@ typedef enum {
|
||||
/**
|
||||
* FpiMatchResult:
|
||||
* @FPI_MATCH_ERROR: An error occured during matching
|
||||
* @FPI_MATCH_SUCCESS: The prints matched
|
||||
* @FPI_MATCH_FAIL: The prints did not match
|
||||
* @FPI_MATCH_SUCCESS: The prints matched
|
||||
*/
|
||||
typedef enum {
|
||||
FPI_MATCH_ERROR = 0,
|
||||
FPI_MATCH_SUCCESS,
|
||||
FPI_MATCH_ERROR = -1, /* -1 for g_task_propagate_int */
|
||||
FPI_MATCH_FAIL,
|
||||
FPI_MATCH_SUCCESS,
|
||||
} FpiMatchResult;
|
||||
|
||||
void fpi_print_add_print (FpPrint *print,
|
||||
|
||||
Reference in New Issue
Block a user