Commit d23860cd authored by Marco Trevisan's avatar Marco Trevisan
Browse files

device: Remove unused disconnected flag

We were saving the state of a disconnected device because we used a
workaround to figure it out, but now libfprint would provide us a proper
GError in such case, and so we'd handle it without the need of saving the
state, given it's never used anyways.
parent 90298134
......@@ -112,8 +112,6 @@ typedef struct {
FprintDeviceAction current_action;
GCancellable *current_cancellable;
DBusGMethodInvocation *current_cancel_context;
/* Whether the device was disconnected */
gboolean disconnected;
} FprintDevicePrivate;
G_DEFINE_TYPE_WITH_CODE(FprintDevice, fprint_device, G_TYPE_OBJECT, G_ADD_PRIVATE (FprintDevice));
......@@ -390,14 +388,6 @@ enroll_result_to_name (gboolean completed, gboolean enrolled, GError *error)
}
}
static void
set_disconnected (FprintDevicePrivate *priv, const char *res)
{
if (g_str_equal (res, "enroll-disconnected") ||
g_str_equal (res, "verify-disconnected"))
priv->disconnected = TRUE;
}
static gboolean
_fprint_device_check_claimed (FprintDevice *rdev,
DBusGMethodInvocation *context,
......@@ -748,8 +738,6 @@ static void verify_cb(FpDevice *dev, GAsyncResult *res, void *user_data)
g_debug("verify_cb: result %s", name);
set_disconnected (priv, name);
/* Automatically restart the operation for retry failures */
if (error && error->domain == FP_DEVICE_RETRY) {
g_signal_emit(rdev, signals[SIGNAL_VERIFY_STATUS], 0, name, FALSE);
......@@ -796,8 +784,6 @@ static void identify_cb(FpDevice *dev, GAsyncResult *res, void *user_data)
g_debug("identify_cb: result %s", name);
set_disconnected (priv, name);
/* Automatically restart the operation for retry failures */
if (error && error->domain == FP_DEVICE_RETRY) {
g_signal_emit (rdev, signals[SIGNAL_VERIFY_STATUS], 0, name, FALSE);
......@@ -1127,8 +1113,6 @@ static void enroll_cb(FpDevice *dev, GAsyncResult *res, void *user_data)
name = "enroll-failed";
}
set_disconnected (priv, name);
g_signal_emit(rdev, signals[SIGNAL_ENROLL_STATUS], 0, name, TRUE);
if (error && !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment