fpi-device: Use the current action string instead of value

This commit is contained in:
Marco Trevisan (Treviño) 2020-04-29 20:16:02 +02:00
parent fd2875aa3e
commit b6f965c1d9

View file

@ -593,7 +593,11 @@ fpi_device_action_error (FpDevice *device,
if (error != NULL)
{
g_debug ("Device reported generic error during action; action was: %i", 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
{
@ -682,10 +686,13 @@ 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;
g_autoptr(GTask) task = 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);
priv->current_action = FPI_DEVICE_ACTION_NONE;