device: Return 'verify-no-match' on cancelled verification

We were returning a 'verify-unknown-error' while we actually know what
happened, so better to return a soft operation failure.
This commit is contained in:
Marco Trevisan (Treviño)
2020-02-10 17:23:19 +01:00
committed by Bastien Nocera
parent b312a5e540
commit 0e993d92e2
2 changed files with 15 additions and 0 deletions

View File

@ -345,6 +345,8 @@ verify_result_to_name (gboolean match, GError *error)
*/
if (g_error_matches (error, FP_DEVICE_ERROR, FP_DEVICE_ERROR_PROTO))
return "verify-disconnect";
else if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
return "verify-no-match";
return "verify-unknown-error";
}