diff options
author | Pierre-Luc Beaudoin <pierre-luc@pierlux.com> | 2009-05-28 00:49:37 +0800 |
---|---|---|
committer | Pierre-Luc Beaudoin <pierre-luc.beaudoin@collabora.co.uk> | 2009-06-01 23:35:31 +0800 |
commit | f4029062299a0f1c5f68c213bf65569e35ff44a0 (patch) | |
tree | e648df7a289948d9bbf034b5839592702bd9cc6f /libempathy-gtk/empathy-location-manager.c | |
parent | 8a4e3bef97f66bc40f9c4fb24158f0bd0226ac55 (diff) | |
download | gsoc2013-empathy-f4029062299a0f1c5f68c213bf65569e35ff44a0.tar gsoc2013-empathy-f4029062299a0f1c5f68c213bf65569e35ff44a0.tar.gz gsoc2013-empathy-f4029062299a0f1c5f68c213bf65569e35ff44a0.tar.bz2 gsoc2013-empathy-f4029062299a0f1c5f68c213bf65569e35ff44a0.tar.lz gsoc2013-empathy-f4029062299a0f1c5f68c213bf65569e35ff44a0.tar.xz gsoc2013-empathy-f4029062299a0f1c5f68c213bf65569e35ff44a0.tar.zst gsoc2013-empathy-f4029062299a0f1c5f68c213bf65569e35ff44a0.zip |
Don't call geoclue functions if the init failed
Diffstat (limited to 'libempathy-gtk/empathy-location-manager.c')
-rw-r--r-- | libempathy-gtk/empathy-location-manager.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-location-manager.c b/libempathy-gtk/empathy-location-manager.c index 9da3964ec..040bc619d 100644 --- a/libempathy-gtk/empathy-location-manager.c +++ b/libempathy-gtk/empathy-location-manager.c @@ -531,13 +531,19 @@ publish_cb (EmpathyConf *conf, DEBUG ("Publish Conf changed"); priv = GET_PRIV (manager); - if (!empathy_conf_get_bool (conf, key, &can_publish)) + + + if (empathy_conf_get_bool (conf, key, &can_publish) == FALSE) return; - if (can_publish) + if (can_publish == TRUE) { - if (!priv->is_setup) + if (priv->is_setup == FALSE) setup_geoclue (manager); + /* if still not setup than the init failed */ + if (priv->is_setup == FALSE) + return; + geoclue_address_get_address_async (priv->gc_address, initial_address_cb, manager); geoclue_position_get_position_async (priv->gc_position, |