aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-contact.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-04-08 19:42:43 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-04-08 21:51:50 +0800
commitee8b4ad4f89343de7e965a2414e1f746bd018b5a (patch)
tree08deb9f76e06f63ccdb9b11dce2fc7762ed68e31 /libempathy/empathy-contact.c
parente793c8e563a0ab7f61c06852423571a21f2e3c05 (diff)
downloadgsoc2013-empathy-ee8b4ad4f89343de7e965a2414e1f746bd018b5a.tar
gsoc2013-empathy-ee8b4ad4f89343de7e965a2414e1f746bd018b5a.tar.gz
gsoc2013-empathy-ee8b4ad4f89343de7e965a2414e1f746bd018b5a.tar.bz2
gsoc2013-empathy-ee8b4ad4f89343de7e965a2414e1f746bd018b5a.tar.lz
gsoc2013-empathy-ee8b4ad4f89343de7e965a2414e1f746bd018b5a.tar.xz
gsoc2013-empathy-ee8b4ad4f89343de7e965a2414e1f746bd018b5a.tar.zst
gsoc2013-empathy-ee8b4ad4f89343de7e965a2414e1f746bd018b5a.zip
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.
Diffstat (limited to 'libempathy/empathy-contact.c')
-rw-r--r--libempathy/empathy-contact.c6
1 files changed, 3 insertions, 3 deletions
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)