mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
utils: Use new print deletion API
Use the new API that works by claiming the device and then deleting the prints. Fixes: #26
This commit is contained in:
@ -54,7 +54,12 @@ static void delete_fingerprints(DBusGProxy *dev, const char *username)
|
||||
exit (1);
|
||||
}
|
||||
|
||||
if (!net_reactivated_Fprint_Device_delete_enrolled_fingers(dev, username, &error)) {
|
||||
if (!net_reactivated_Fprint_Device_claim(dev, username, &error)) {
|
||||
g_print("failed to claim device: %s\n", error->message);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
if (!net_reactivated_Fprint_Device_delete_enrolled_fingers2(dev, &error)) {
|
||||
if (dbus_g_error_has_name (error, "net.reactivated.Fprint.Error.NoEnrolledPrints") == FALSE) {
|
||||
g_print("ListEnrolledFingers failed: %s\n", error->message);
|
||||
exit (1);
|
||||
@ -64,6 +69,12 @@ static void delete_fingerprints(DBusGProxy *dev, const char *username)
|
||||
} else {
|
||||
g_print ("Fingerprints deleted on %s\n", g_value_get_string (g_hash_table_lookup (props, "name")));
|
||||
}
|
||||
|
||||
if (!net_reactivated_Fprint_Device_release(dev, &error)) {
|
||||
g_print("ReleaseDevice failed: %s\n", error->message);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
g_hash_table_destroy (props);
|
||||
g_object_unref (p);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user