41 lines
1.4 KiB
Diff
41 lines
1.4 KiB
Diff
From af26f2e307abde413d3f876c16eee93f5f9413fe Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
|
|
Date: Wed, 27 Nov 2019 16:50:54 +0100
|
|
Subject: [PATCH 025/181] 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.
|
|
---
|
|
libfprint/drivers/synaptics/synaptics.c | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/libfprint/drivers/synaptics/synaptics.c b/libfprint/drivers/synaptics/synaptics.c
|
|
index f6faf11..9ecc682 100644
|
|
--- a/libfprint/drivers/synaptics/synaptics.c
|
|
+++ b/libfprint/drivers/synaptics/synaptics.c
|
|
@@ -817,9 +817,9 @@ enroll (FpDevice *device)
|
|
date = fp_print_get_enroll_date (print);
|
|
if (date && g_date_valid (date))
|
|
{
|
|
- y = date->year;
|
|
- m = date->month;
|
|
- d = date->day;
|
|
+ y = g_date_get_year (date);
|
|
+ m = g_date_get_month (date);
|
|
+ d = g_date_get_day (date);
|
|
}
|
|
else
|
|
{
|
|
--
|
|
2.24.1
|
|
|