[empathy] Don't call geoclue functions if the init failed
- From: Pierre-Luc Beaudoin <plbeaudoin src gnome org>
- To: svn-commits-list gnome org
- Subject: [empathy] Don't call geoclue functions if the init failed
- Date: Mon, 1 Jun 2009 11:45:24 -0400 (EDT)
commit f4029062299a0f1c5f68c213bf65569e35ff44a0
Author: Pierre-Luc Beaudoin <pierre-luc pierlux com>
Date: Wed May 27 12:49:37 2009 -0400
Don't call geoclue functions if the init failed
---
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 9da3964..040bc61 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]