auth - fprint - only start after verify stop done

devs/bu5hm4n/pointer-fix
Carsten Haitzler 1 year ago
parent 1cf5595208
commit 2fbbb52f94
  1. 33
      src/bin/e_auth.c

@ -126,23 +126,19 @@ _cb_verify_start(void *data EINA_UNUSED, const Eldbus_Message *m,
printf("FP: verify start...\n");
if (eldbus_message_error_get(m, &name, &text))
{
fprintf(stderr, "Fprint err: %s %s\n", name, text);
fprintf(stderr, "FP: Fprint err: %s %s\n", name, text);
return;
}
}
static void
_verify_begin(void)
_cb_verify_stop(void *data EINA_UNUSED, const Eldbus_Message *m EINA_UNUSED,
Eldbus_Pending *p EINA_UNUSED)
{
Eldbus_Message *m2;
Eldbus_Message_Iter *iter;
// brute force stop a previous verify - if its active - dont care about reply
m2 = eldbus_proxy_method_call_new(proxy_fprint_device, "VerifyStop");
if (m2)
{
eldbus_proxy_send(proxy_fprint_device, m2, NULL, NULL, -1);
}
printf("FP: verify stop...\n");
m2 = eldbus_proxy_method_call_new(proxy_fprint_device, "VerifyStart");
if (m2)
{
@ -152,6 +148,19 @@ _verify_begin(void)
}
}
static void
_verify_begin(void)
{
Eldbus_Message *m2;
printf("FP: verify begin...\n");
m2 = eldbus_proxy_method_call_new(proxy_fprint_device, "VerifyStop");
if (m2)
{
eldbus_proxy_send(proxy_fprint_device, m2, _cb_verify_stop, NULL, -1);
}
}
static void
_cb_verify(void *data EINA_UNUSED, const Eldbus_Message *m)
{
@ -163,7 +172,7 @@ _cb_verify(void *data EINA_UNUSED, const Eldbus_Message *m)
printf("FP: verify ...\n");
if (eldbus_message_error_get(m, &name, &text))
{
fprintf(stderr, "Fprint err: %s %s\n", name, text);
fprintf(stderr, "FP: Fprint err: %s %s\n", name, text);
return;
}
if (!eldbus_message_arguments_get(m, "sb", &txt, &val)) return;
@ -208,7 +217,7 @@ _cb_list_enrolled_fingers(void *data EINA_UNUSED, const Eldbus_Message *m,
printf("FP: list fingers...\n");
if (eldbus_message_error_get(m, &name, &text))
{
fprintf(stderr, "Fprint err: %s %s\n", name, text);
fprintf(stderr, "FP: Fprint err: %s %s\n", name, text);
return;
}
printf("FP: list fingers...\n");
@ -250,7 +259,7 @@ _cb_claim(void *data EINA_UNUSED, const Eldbus_Message *m EINA_UNUSED,
printf("FP: claim\n");
if (eldbus_message_error_get(m, &name, &text))
{
fprintf(stderr, "Fprint err: %s %s\n", name, text);
fprintf(stderr, "FP: Fprint err: %s %s\n", name, text);
return;
}
// ListEnrolledFingrs '$USER' -> "as"
@ -313,7 +322,7 @@ _cb_get_default_device(void *data EINA_UNUSED, const Eldbus_Message *m,
printf("FP: get default device...\n");
if (eldbus_message_error_get(m, &name, &text))
{
fprintf(stderr, "Fprint err: %s %s\n", name, text);
fprintf(stderr, "FP: Fprint err: %s %s\n", name, text);
return;
}
if (!eldbus_message_arguments_get(m, "o", &dev)) return;

Loading…
Cancel
Save