mafpmoc: Allow listing non-fprint prints

It's then up to the upper levels to handle them differently, and fprintd
is already strong enough to ignore them.
This commit is contained in:
Marco Trevisan (Treviño)
2026-06-18 15:47:34 +02:00
parent 5a2762fe17
commit 77b73b04b4
+6 -5
View File
@@ -1948,19 +1948,20 @@ fp_list_get_tpl_info_cb (FpiDeviceMafpmoc *self,
fp_dbg ("result: %d", resp->result); fp_dbg ("result: %d", resp->result);
if (resp->result == MAFP_SUCCESS) if (resp->result == MAFP_SUCCESS)
{
fp_dbg ("tpl_info: %s", resp->tpl_info.uid);
if (resp->tpl_info.uid[0] == 'F' && resp->tpl_info.uid[1] == 'P')
{ {
FpPrint *print; FpPrint *print;
mafp_template_t *template = &self->templates->total_list[self->templates->index]; mafp_template_t *template = &self->templates->total_list[self->templates->index];
fp_dbg ("tpl_info: %s", resp->tpl_info.uid);
if (resp->tpl_info.uid[0] == 'F' && resp->tpl_info.uid[1] == 'P')
memcpy (template->uid, resp->tpl_info.uid, sizeof (resp->tpl_info.uid)); memcpy (template->uid, resp->tpl_info.uid, sizeof (resp->tpl_info.uid));
else
strncpy (template->uid, "NOT-A-FPRINT-PRINT", sizeof (resp->tpl_info.uid));
print = mafp_print_from_template (self, template); print = mafp_print_from_template (self, template);
g_ptr_array_add (self->templates->list, g_object_ref_sink (print)); g_ptr_array_add (self->templates->list, g_object_ref_sink (print));
} }
}
if (++self->templates->index < self->templates->total_num) if (++self->templates->index < self->templates->total_num)
{ {
fpi_ssm_jump_to_state (self->task_ssm, FP_LIST_GET_TEMPLATE_INFO); fpi_ssm_jump_to_state (self->task_ssm, FP_LIST_GET_TEMPLATE_INFO);