summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-navigation/gpsd
diff options
context:
space:
mode:
authorHermes Zhang <chenhuiz@axis.com>2021-03-31 17:39:54 +0800
committerKhem Raj <raj.khem@gmail.com>2021-04-01 08:32:47 -0700
commit285e4c9bfb5bee87f33193c455ce4962a0b927c3 (patch)
treeff743e57940f4bd17c05fb5bac3eca0f4e43122f /meta-oe/recipes-navigation/gpsd
parent75ef564e5994ec212da7e9fe40ec7497dc7ccaa4 (diff)
downloadmeta-openembedded-285e4c9bfb5bee87f33193c455ce4962a0b927c3.tar.gz
gpsd: backport d-bus message time patch from upstream
This patch is backport from 821c149d486c0e67c1bd35d7c044ede9348aeb8d of upstream to fix the broken d-bus message time Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-navigation/gpsd')
-rw-r--r--meta-oe/recipes-navigation/gpsd/gpsd/0001-gpsd-dbusexport.c-Fix-broken-d-bus-message-time.patch36
-rw-r--r--meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb1
2 files changed, 37 insertions, 0 deletions
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd/0001-gpsd-dbusexport.c-Fix-broken-d-bus-message-time.patch b/meta-oe/recipes-navigation/gpsd/gpsd/0001-gpsd-dbusexport.c-Fix-broken-d-bus-message-time.patch
new file mode 100644
index 000000000..659865efe
--- /dev/null
+++ b/meta-oe/recipes-navigation/gpsd/gpsd/0001-gpsd-dbusexport.c-Fix-broken-d-bus-message-time.patch
@@ -0,0 +1,36 @@
1From c9cec2a888d4fea8534be78a0f46d920155ceae6 Mon Sep 17 00:00:00 2001
2From: Paul Fertser <fercerpav@gmail.com>
3Date: Wed, 4 Nov 2020 12:40:50 -0800
4Subject: [PATCH] gpsd/dbusexport.c: Fix broken d-bus message time.
5
6Change-Id: I4b9990ce4517a8feb29fc9e090c62f5a0c56ddd5
7---
8 dbusexport.c | 4 +++-
9 1 file changed, 3 insertions(+), 1 deletion(-)
10
11diff --git a/dbusexport.c b/dbusexport.c
12index 40b35739e..5d08a8702 100644
13--- a/dbusexport.c
14+++ b/dbusexport.c
15@@ -38,6 +38,7 @@ void send_dbus_fix(struct gps_device_t *channel)
16 /*DBusMessageIter iter; */
17 dbus_uint32_t serial; /* collected, but not used */
18 char *gpsd_devname;
19+ double dtime; // time as a double, loss of precision!
20
21 /* if the connection is non existent, return without doing anything */
22 if (connection == NULL)
23@@ -51,8 +52,9 @@ void send_dbus_fix(struct gps_device_t *channel)
24 /* the dbus/locationd doc fails to specify altitude as WGS84 or MSL.
25 * assume altMSL */
26 message = dbus_message_new_signal("/org/gpsd", "org.gpsd", "fix");
27+ dtime = TSTONS(&gpsfix->time);
28 dbus_message_append_args(message,
29- DBUS_TYPE_DOUBLE, &(gpsfix->time),
30+ DBUS_TYPE_DOUBLE, &dtime,
31 DBUS_TYPE_INT32, &(gpsfix->mode),
32 DBUS_TYPE_DOUBLE, &(gpsfix->ept),
33 DBUS_TYPE_DOUBLE, &(gpsfix->latitude),
34--
352.20.1
36
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb b/meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb
index 3888ad8fa..0989cc139 100644
--- a/meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb
+++ b/meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb
@@ -8,6 +8,7 @@ PROVIDES = "virtual/gpsd"
8SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \ 8SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \
9 file://0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch \ 9 file://0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch \
10 file://0001-Revert-SConstruct-Add-test-for-sizeof-time_t-result-.patch \ 10 file://0001-Revert-SConstruct-Add-test-for-sizeof-time_t-result-.patch \
11 file://0001-gpsd-dbusexport.c-Fix-broken-d-bus-message-time.patch \
11 file://gpsd.init \ 12 file://gpsd.init \
12" 13"
13SRC_URI[md5sum] = "cf7fdec7ce7221d20bee1a7246362b05" 14SRC_URI[md5sum] = "cf7fdec7ce7221d20bee1a7246362b05"