Detect when a device is disconnected

Pretty hacky way to detect whether the device we're handling has
been disconnected during a verify or enrollment. This should allow
us to avoid users having to wait when somebody pulls the plug.
This commit is contained in:
Bastien Nocera
2009-01-27 12:29:23 +00:00
committed by Daniel Drake
parent bbead87f58
commit 4ea1c48f9f
4 changed files with 56 additions and 7 deletions

View File

@ -100,7 +100,7 @@ static void find_finger(DBusGProxy *dev, const char *username)
static void verify_result(GObject *object, const char *result, gboolean done, void *user_data)
{
gboolean *verify_completed = user_data;
g_print("Verify result: %s\n", result);
g_print("Verify result: %s (%s)\n", result, done ? "done" : "not done");
if (done != FALSE)
*verify_completed = TRUE;
}