From ee8b4ad4f89343de7e965a2414e1f746bd018b5a Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 8 Apr 2010 13:42:43 +0200 Subject: update_geocode: don't search for position if we already have lat or lon If contact publishes his position, it's fair to assume it publishes lat and lon. --- libempathy/empathy-contact.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libempathy/empathy-contact.c') diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c index f6f0e255d..4f554419c 100644 --- a/libempathy/empathy-contact.c +++ b/libempathy/empathy-contact.c @@ -1293,15 +1293,15 @@ update_geocode (EmpathyContact *contact) static GeoclueGeocode *geocode; gchar *str; GHashTable *address; - GValue* value; GHashTable *location; location = empathy_contact_get_location (contact); if (location == NULL) return; - value = g_hash_table_lookup (location, EMPATHY_LOCATION_LAT); - if (value != NULL) + /* No need to search for position if contact published it */ + if (g_hash_table_lookup (location, EMPATHY_LOCATION_LAT) != NULL || + g_hash_table_lookup (location, EMPATHY_LOCATION_LON) != NULL) return; if (geocode == NULL) -- cgit v1.2.3