diff options
author | Maciej S. Szmigiero <maciej.szmigiero@oracle.com> | 2023-01-05 23:41:38 +0100 |
---|---|---|
committer | Maciej S. Szmigiero <maciej.szmigiero@oracle.com> | 2023-01-07 22:00:20 +0100 |
commit | fb4ce2462bd7e7a5c8fb959903bb98567ec177fa (patch) | |
tree | 98a818d28c1ac37ca13a8d274c0437661080178e | |
parent | fe5805f7c9521d50edb597ec4bfec196fd9db180 (diff) | |
download | geoclue-fb4ce2462bd7e7a5c8fb959903bb98567ec177fa.tar.gz |
web-source: Only update "last_submitted" if we actually attempt to submit
This way we won't be waiting inter-submission intervals even though we
aren't actually submitting anything.
-rw-r--r-- | src/gclue-web-source.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gclue-web-source.c b/src/gclue-web-source.c index 1da01dd..881aa18 100644 --- a/src/gclue-web-source.c +++ b/src/gclue-web-source.c @@ -526,6 +526,9 @@ on_submit_source_location_notify (GObject *source_object, g_autoptr(SoupMessage) query = NULL; g_autoptr(GError) error = NULL; + if (!web->priv->submit_url_reachable) + return; + location = gclue_location_source_get_location (source); if (location == NULL || gclue_location_get_accuracy (location) > @@ -536,9 +539,6 @@ on_submit_source_location_notify (GObject *source_object, web->priv->last_submitted = gclue_location_get_timestamp (location); - if (!web->priv->submit_url_reachable) - return; - query = GCLUE_WEB_SOURCE_GET_CLASS (web)->create_submit_query (web, location, |