From 39c0f4468521deaa00f4db3e891cd20992aa96c9 Mon Sep 17 00:00:00 2001 From: Pierre-Luc Beaudoin Date: Mon, 8 Jun 2009 18:37:47 -0400 Subject: 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). --- libempathy-gtk/empathy-location-manager.c | 10 ++++++++-- 1 file 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"); -- cgit v1.2.3