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:
parent
f404a69b73
commit
6209b22e3b
1 changed files with 3 additions and 3 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue