device: Print warnings for fatal errors

This commit is contained in:
Benjamin Berg 2019-12-04 17:00:01 +01:00
parent cdd79a0935
commit 5043ef3c7d

View file

@ -757,6 +757,9 @@ static void verify_cb(FpDevice *dev, GAsyncResult *res, void *user_data)
g_clear_object (&priv->verify_data);
g_signal_emit(rdev, signals[SIGNAL_VERIFY_STATUS], 0, name, TRUE);
if (error && !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
g_warning ("Device reported an error during verify: %s", error->message);
/* Return the cancellation or reset action right away if vanished. */
if (priv->current_cancel_context) {
dbus_g_method_return(priv->current_cancel_context);
@ -800,6 +803,9 @@ static void identify_cb(FpDevice *dev, GAsyncResult *res, void *user_data)
g_clear_pointer (&priv->identify_data, g_ptr_array_unref);
g_signal_emit (rdev, signals[SIGNAL_VERIFY_STATUS], 0, name, TRUE);
if (error && !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
g_warning ("Device reported an error during identify: %s", error->message);
/* Return the cancellation or reset action right away if vanished. */
if (priv->current_cancel_context) {
dbus_g_method_return(priv->current_cancel_context);
@ -1103,6 +1109,9 @@ static void enroll_cb(FpDevice *dev, GAsyncResult *res, void *user_data)
g_signal_emit(rdev, signals[SIGNAL_ENROLL_STATUS], 0, name, TRUE);
if (error && !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
g_warning ("Device reported an error during enroll: %s", error->message);
/* Return the cancellation or reset action right away if vanished. */
if (priv->current_cancel_context) {
dbus_g_method_return(priv->current_cancel_context);