From 4824380f79eacd0cdfee4dc6394701a13fe5f1d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 13 Oct 2022 12:36:43 +0200 Subject: [PATCH] Revert "fpi-device: Avoid using device action strings" This reverts commit fbffb62ecba75450a518cb290a6aee714de4b6da. --- libfprint/fpi-device.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/libfprint/fpi-device.c b/libfprint/fpi-device.c index 7efdfe50..89504dab 100644 --- a/libfprint/fpi-device.c +++ b/libfprint/fpi-device.c @@ -747,8 +747,11 @@ fpi_device_action_error (FpDevice *device, if (error != NULL) { - g_debug ("Device reported generic error (%s) during action; action was: %d", - error->message, priv->current_action); + g_autofree char *action_str = NULL; + + action_str = g_enum_to_string (FPI_TYPE_DEVICE_ACTION, priv->current_action); + g_debug ("Device reported generic error (%s) during action; action was: %s", + error->message, action_str); } else { @@ -962,13 +965,15 @@ fp_device_task_return_in_idle_cb (gpointer user_data) { FpDeviceTaskReturnData *data = user_data; FpDevicePrivate *priv = fp_device_get_instance_private (data->device); + g_autofree char *action_str = NULL; FpiDeviceAction action; g_autoptr(GTask) task = NULL; g_autoptr(GError) cancellation_reason = NULL; - g_debug ("Completing action %d in idle!", priv->current_action); + action_str = g_enum_to_string (FPI_TYPE_DEVICE_ACTION, priv->current_action); + g_debug ("Completing action %s in idle!", action_str); task = g_steal_pointer (&priv->current_task); action = priv->current_action;