synaptics: Use GDate getters to retrieve the DMY values

As per commit 201b5a961 we use g_date_copy() to copy the date, however the
GLib implementation is done assuming that the GDate getters are always used
as the copy function doesn't preserve the original format of the date
(whether is using julian days or dmy), and the synaptics driver access to
the dmy values directly, without using the getter that would recompute the
proper values.
Causing a read error of unset values.

So, to avoid this, just use the g_date_get_* getters to retrieve the day
month and year for for defining the print enroll id.
This commit is contained in:
Marco Trevisan (Treviño) 2019-11-27 16:50:54 +01:00
parent 1b23f0efe1
commit e812653acd

View file

@ -817,9 +817,9 @@ enroll (FpDevice *device)
date = fp_print_get_enroll_date (print); date = fp_print_get_enroll_date (print);
if (date && g_date_valid (date)) if (date && g_date_valid (date))
{ {
y = date->year; y = g_date_get_year (date);
m = date->month; m = g_date_get_month (date);
d = date->day; d = g_date_get_day (date);
} }
else else
{ {