diff options
author | Pierre-Luc Beaudoin <pierre-luc.beaudoin@collabora.co.uk> | 2009-06-09 06:37:47 +0800 |
---|---|---|
committer | Pierre-Luc Beaudoin <pierre-luc.beaudoin@collabora.co.uk> | 2009-06-10 02:43:31 +0800 |
commit | 39c0f4468521deaa00f4db3e891cd20992aa96c9 (patch) | |
tree | 37e20f8b629d97583f4140942192d89e1edce2ee | |
parent | 62a2f58de7ff809169787fa6de369c15465c69fd (diff) | |
download | gsoc2013-empathy-39c0f4468521deaa00f4db3e891cd20992aa96c9.tar gsoc2013-empathy-39c0f4468521deaa00f4db3e891cd20992aa96c9.tar.gz gsoc2013-empathy-39c0f4468521deaa00f4db3e891cd20992aa96c9.tar.bz2 gsoc2013-empathy-39c0f4468521deaa00f4db3e891cd20992aa96c9.tar.lz gsoc2013-empathy-39c0f4468521deaa00f4db3e891cd20992aa96c9.tar.xz gsoc2013-empathy-39c0f4468521deaa00f4db3e891cd20992aa96c9.tar.zst gsoc2013-empathy-39c0f4468521deaa00f4db3e891cd20992aa96c9.zip |
Geoclue doesn't like NONE as an accuracy level
Possibly a bug in Geoclue, but passing COUNTRY instead of NONE as
the minimum accuracy required gives better results (ie more providers
are possible).
-rw-r--r-- | libempathy-gtk/empathy-location-manager.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-location-manager.c b/libempathy-gtk/empathy-location-manager.c index fb804315c..1b76e2e1d 100644 --- a/libempathy-gtk/empathy-location-manager.c +++ b/libempathy-gtk/empathy-location-manager.c @@ -302,7 +302,10 @@ address_changed_cb (GeoclueAddress *address, g_hash_table_remove (priv->location, EMPATHY_LOCATION_POSTAL_CODE); if (g_hash_table_size (details) == 0) - return; + { + DEBUG ("\t - (Empty)"); + return; + } g_hash_table_iter_init (&iter, details); while (g_hash_table_iter_next (&iter, &key, &value)) @@ -449,8 +452,11 @@ update_resources (EmpathyLocationManager *location_manager) DEBUG ("Updating resources %d", priv->resources); + /* As per Geoclue bug #15126, using NONE results in no address + * being found as geoclue-manual report an empty address with + * accuracy = NONE */ if (!geoclue_master_client_set_requirements (priv->gc_client, - GEOCLUE_ACCURACY_LEVEL_NONE, 0, TRUE, priv->resources, + GEOCLUE_ACCURACY_LEVEL_COUNTRY, 0, TRUE, priv->resources, NULL)) { DEBUG ("set_requirements failed"); |