Age | Commit message (Collapse) | Author | Files | Lines |
|
Since we longer read NMEA data from service if we fail to read from it
and it's most likely indication that service has closed the socket
without (first) advertising it going down, let's just drop the service
from the list and refresh available accuracy level.
|
|
'self' should always be the first argument.
|
|
The g_data_input_stream_read_line_finish() documentation says:
If there's no content to read, it will still return NULL, but error
won't be set.
So we can end up with a crash when turning off the NMEA server:
#0 0x0000000000420273 in on_read_gga_sentence (object=0x6b0870 [GDataInputStream], result=0x661510, user_data=0x6769b0) at gclue-nmea-source.c:449
#1 0x00007ffff6d110c3 in g_task_return_now (task=0x661510 [GTask]) at gtask.c:1088
#2 0x00007ffff6d1175e in g_task_return (task=0x661510 [GTask], type=<optimized out>) at gtask.c:1146
#3 0x00007ffff6cc98d7 in g_data_input_stream_read_complete (task=0x661510 [GTask], read_length=0, skip_length=0) at gdatainputstream.c:982
Co-author: Ankit <ankitstarski@gmail.com>.
https://bugs.freedesktop.org/show_bug.cgi?id=91940
|
|
If we get a new location update with timestamp older than existing
location, let's ignore that.
This solves the issue of wifi-based geolocation getting overwritten by
older location from network NMEA source, just cause it was more
accurate.
|
|
|
|
Add a method to duplicate a location object and make use of that from
location-source.
|
|
|
|
If timestamp on new location is older than that on previous location,
calculating speed from them does not make sense. Instead simply set the
speed to unknown in such cases.
|
|
Same timestamp on new and previous locations, is not programmer error
and hence use of g_return_if_fail() for this case would be wrong.
Instead simply set the speed to unknown in such cases.
|
|
|
|
The code didn’t even make sense. My bad.
https://bugs.freedesktop.org/show_bug.cgi?id=91939
|
|
This patch fixes a bug causing some GPS locations to be discarded
when the device is moving slowly, because the distance from previous
location is expressed in kilometers, while the accuracy of the
GPS location is in meters.
Based on patch from Fabrice Bellet <fabrice@bellet.info>
https://bugs.freedesktop.org/show_bug.cgi?id=89922
|
|
Currently if a second service is discovered that has the same accuracy
as the first one in the list, g_list_insert_sorted() can (and in
practice does) insert it in the beginning since our comparison function
declares them both equal. Because of this, we end up switching to the
new service even if its accuracy level is the same as the one we are
already using.
Let's solve this by also taking time of discovery into account in our
comparison function.
|
|
|
|
|
|
Currently, if source is active and the service is use goes away while
another service is available, we don't switch to the other service until
source is restarted by geoclue. This patch not only fixes that but also
switches to a new more accurate source.
|
|
This is a good idea anyway (to keep code cleaner) but the new function
will also be used in a following path to disconnect (and clean-up
resoure) if the active source either goes away or we find a more
accurate service.
|
|
Don't try to disconnect the connection before ensuring it's not NULL.
|
|
|
|
If we for some reason don't manage to close the socket, it's not a big
deal and we should continue to freeing resources and besides the return
value isn't really used.
|
|
|
|
This is a good idea anyway (to keep code cleaner) but the new function
will also be used in a following path to connect to a new source when
source is active already.
|
|
And by doing so we avoid unnecessarily creating/initializing some
resources.
|
|
|
|
The return value isn't really used. The boolean return is only there as
a hack to ensure that we don't start a source twice.
|
|
If reading from NMEA source fails because of cancellation, there is no
cause for an alarm since cancellation is done by source itself.
|
|
Don't unref stream object until we are done using it.
|
|
Ideally memory should be freed as soon as not used anymore.
|
|
Removing nodes from the list does not free associated data, we gotta do
that explicitly.
|
|
|
|
|
|
_stop() was returning early if connection was active. This is quite the
opposite to what it should be doing.
|
|
|
|
Don't forget to add the newly activated source to the private list of
active sources, otherwise it won't be stopped when it's accuracy level
changes to none or greater than max accuracy.
|
|
`make distcheck` breaks with the error:
-----
The following files contain translations and are currently not in use.
Please
consider adding these to the POTFILES.in file, located in the po/
directory.
sub/demo/geoclue-demo-agent.desktop.in
sub/demo/geoclue-where-am-i.desktop.in
----
The only known workaround is to add these paths to POTFILES.skip and
this patch does that.
|
|
The policy applies only to the process sending a message, not the one
receiving it. We need to be sure only the geoclue user can call the
Agent's methods.
Explanation by smvc from the bugreport:
[...]
The issue here is that every file in /etc/dbus-1/system.d applies to
everything on the system bus - there is no way to limit policies to
particular packages. So Geoclue2's policy allows any uid to call any
method on the Properties interface at the path
/org/freedesktop/GeoClue2/Agent, in *any* destination.
You might think "why would any other service have an object at
/org/freedesktop/GeoClue2/Agent?", but not all services distinguish
between object paths: those that are implemented in terms of simplistic
libdbus filters[1] typically do not.
[...]
https://bugs.freedesktop.org/show_bug.cgi?id=91214
|
|
Do not ship generated D-Bus service files in the tarball.
https://bugs.freedesktop.org/show_bug.cgi?id=91214
|
|
|
|
Add configuration option to enable/disable Network NMEA source. Default
is enabled.
https://bugs.freedesktop.org/show_bug.cgi?id=90974
|
|
GClueNMEASource receives NMEA GGA sentences from a NMEA source on the
network. It uses Avahi for the auto-discovery of nmea-tcp services on
local network.
This will enable us to receive location info from other devices on the
local network with location capabilities, such as smartphones.
This patch adds dependency on avahi-glib and avahi-client.
https://bugs.freedesktop.org/show_bug.cgi?id=90974
|
|
Add gclue_location_create_from_gga() the creates a GClueLocation object
out of an NMEA GGA sentence. This function works with the help of
get_accuracy_from_hdop(), parse_coordinate_string() and
parse_altitude_string() that are moved from gclue-modem-gps.c.
https://bugs.freedesktop.org/show_bug.cgi?id=90974
|
|
gclue_config_get_app_perm() is supposed to return GClueAppPerm enum, not
a boolean.
|
|
Add a note to application-specific section, informing people that their
favorite app does not need to be in the config to be able to get
location.
|
|
|
|
Simply returning TRUE from D-Bus method handler won't actually complete
the method call, we need to explicitly complete the call.
|
|
We haven't required geoip package for a while so no need to declare
required version of it.
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=91237
|
|
Only fetch heading from compass if 'compute-heading' is set to TRUE.
This fixes the double location updates on each heading update from
compass.
|
|
This property now also covers whether the base GClueLocationSource class
should get the movement from hardware (e.g a compass). Currently only
GClueLocator sets this property to FALSE but in future GClueModemGPS
might need to do the same. See:
https://bugs.freedesktop.org/show_bug.cgi?id=89907
|
|
|