Blame SOURCES/0025-synaptics-Use-GDate-getters-to-retrieve-the-DMY-valu.patch

73b847
From af26f2e307abde413d3f876c16eee93f5f9413fe Mon Sep 17 00:00:00 2001
73b847
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
73b847
Date: Wed, 27 Nov 2019 16:50:54 +0100
73b847
Subject: [PATCH 025/181] synaptics: Use GDate getters to retrieve the DMY
73b847
 values
73b847
73b847
As per commit 201b5a961 we use g_date_copy() to copy the date, however the
73b847
GLib implementation is done assuming that the GDate getters are always used
73b847
as the copy function doesn't preserve the original format of the date
73b847
(whether is using julian days or dmy), and the synaptics driver access to
73b847
the dmy values directly, without using the getter that would recompute the
73b847
proper values.
73b847
Causing a read error of unset values.
73b847
73b847
So, to avoid this, just use the g_date_get_* getters to retrieve the day
73b847
month and year for for defining the print enroll id.
73b847
---
73b847
 libfprint/drivers/synaptics/synaptics.c | 6 +++---
73b847
 1 file changed, 3 insertions(+), 3 deletions(-)
73b847
73b847
diff --git a/libfprint/drivers/synaptics/synaptics.c b/libfprint/drivers/synaptics/synaptics.c
73b847
index f6faf11..9ecc682 100644
73b847
--- a/libfprint/drivers/synaptics/synaptics.c
73b847
+++ b/libfprint/drivers/synaptics/synaptics.c
73b847
@@ -817,9 +817,9 @@ enroll (FpDevice *device)
73b847
   date = fp_print_get_enroll_date (print);
73b847
   if (date && g_date_valid (date))
73b847
     {
73b847
-      y = date->year;
73b847
-      m = date->month;
73b847
-      d = date->day;
73b847
+      y = g_date_get_year (date);
73b847
+      m = g_date_get_month (date);
73b847
+      d = g_date_get_day (date);
73b847
     }
73b847
   else
73b847
     {
73b847
-- 
73b847
2.24.1
73b847