diff options
author | Chris Talbot <chris@talbothome.com> | 2023-04-27 08:56:50 -0400 |
---|---|---|
committer | Teemu Ikonen <tpikonen@mailbox.org> | 2023-05-14 17:51:49 +0000 |
commit | 1c16afc67cefe7dc448f8cedb2c4377d82ee70c8 (patch) | |
tree | 82cae830f4ccf86871c0ca59591f7e1311395759 | |
parent | 94d0971484787f3252f746aa39e5341f942103b5 (diff) |
gclue-locator: Ignore values that have unknown accuracy
-rw-r--r-- | src/gclue-locator.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gclue-locator.c b/src/gclue-locator.c index fd6266c..13c7107 100644 --- a/src/gclue-locator.c +++ b/src/gclue-locator.c @@ -89,6 +89,14 @@ set_location (GClueLocator *locator, { GClueLocation *cur_location; + if (gclue_location_get_accuracy (location) == + GCLUE_LOCATION_ACCURACY_UNKNOWN) { + /* If we do not know the accuracy, discard the update */ + g_debug ("Discarding %s location with unknown accuracy", + src_name); + return; + } + cur_location = gclue_location_source_get_location (GCLUE_LOCATION_SOURCE (locator)); |