1
=== modified file 'src/location-geoclue.c'
2
--- old/src/location-geoclue.c 2015-08-04 12:01:37 +0000
3
+++ new/src/location-geoclue.c 2015-12-28 19:39:58 +0000
10
#include <geoclue/geoclue-master.h>
11
#include <geoclue/geoclue-position.h>
12
@@ -192,13 +193,24 @@ location_geoclue_get_location(location_g
14
double latitude = 0, longitude = 0;
16
- fields = geoclue_position_get_position(state->position, NULL,
17
- &latitude, &longitude, NULL,
20
- g_printerr(_("Could not get location: %s.\n"), error->message);
21
- g_error_free(error);
23
+ /* Retry 3 times because this seems to timeout quite a bit */
26
+ fields = geoclue_position_get_position(state->position, NULL,
27
+ &latitude, &longitude, NULL,
30
+ g_printerr(_("Could not get location: %s.\n"), error->message);
31
+ g_error_free(error);
34
+ if (fields & GEOCLUE_POSITION_FIELDS_LATITUDE &&
35
+ fields & GEOCLUE_POSITION_FIELDS_LONGITUDE) {
38
+ g_warning(_("Could not get location, %d retries left.\n"), retries);
39
+ /* Sleep for a while to let */
43
if (fields & GEOCLUE_POSITION_FIELDS_LATITUDE &&