Revert "fpi-device: Avoid using device action strings"

This reverts commit fbffb62ecb.
This commit is contained in:
Marco Trevisan (Treviño)
2022-10-13 12:36:43 +02:00
parent fbffb62ecb
commit 4824380f79
+8 -3
View File
@@ -747,8 +747,11 @@ fpi_device_action_error (FpDevice *device,
if (error != NULL) if (error != NULL)
{ {
g_debug ("Device reported generic error (%s) during action; action was: %d", g_autofree char *action_str = NULL;
error->message, priv->current_action);
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 else
{ {
@@ -962,13 +965,15 @@ fp_device_task_return_in_idle_cb (gpointer user_data)
{ {
FpDeviceTaskReturnData *data = user_data; FpDeviceTaskReturnData *data = user_data;
FpDevicePrivate *priv = fp_device_get_instance_private (data->device); FpDevicePrivate *priv = fp_device_get_instance_private (data->device);
g_autofree char *action_str = NULL;
FpiDeviceAction action; FpiDeviceAction action;
g_autoptr(GTask) task = NULL; g_autoptr(GTask) task = NULL;
g_autoptr(GError) cancellation_reason = 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); task = g_steal_pointer (&priv->current_task);
action = priv->current_action; action = priv->current_action;