aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-account.c
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2009-08-27 01:57:57 +0800
committerCosimo Cecchi <cosimoc@gnome.org>2009-08-27 02:06:25 +0800
commit45808d25bd1565d811a1cebb6d74af5318c9ec95 (patch)
treece6588d5414eefd48ed153c94928828bb8007a27 /libempathy/empathy-account.c
parent2d3e3cdf6e8cf6753b9fb1167399c68f90b55c75 (diff)
downloadgsoc2013-empathy-45808d25bd1565d811a1cebb6d74af5318c9ec95.tar
gsoc2013-empathy-45808d25bd1565d811a1cebb6d74af5318c9ec95.tar.gz
gsoc2013-empathy-45808d25bd1565d811a1cebb6d74af5318c9ec95.tar.bz2
gsoc2013-empathy-45808d25bd1565d811a1cebb6d74af5318c9ec95.tar.lz
gsoc2013-empathy-45808d25bd1565d811a1cebb6d74af5318c9ec95.tar.xz
gsoc2013-empathy-45808d25bd1565d811a1cebb6d74af5318c9ec95.tar.zst
gsoc2013-empathy-45808d25bd1565d811a1cebb6d74af5318c9ec95.zip
Only request presence when the account is enabled (#593161).
Diffstat (limited to 'libempathy/empathy-account.c')
-rw-r--r--libempathy/empathy-account.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/libempathy/empathy-account.c b/libempathy/empathy-account.c
index d8e59ea14..5527aab68 100644
--- a/libempathy/empathy-account.c
+++ b/libempathy/empathy-account.c
@@ -952,17 +952,20 @@ empathy_account_set_enabled_async (EmpathyAccount *account,
return;
}
- acc_manager = empathy_account_manager_dup_singleton ();
- presence = empathy_account_manager_get_requested_global_presence
- (acc_manager, &status, &status_message);
+ if (enabled)
+ {
+ acc_manager = empathy_account_manager_dup_singleton ();
+ presence = empathy_account_manager_get_requested_global_presence
+ (acc_manager, &status, &status_message);
- if (presence != TP_CONNECTION_PRESENCE_TYPE_UNSET)
- empathy_account_request_presence (account, presence, status,
- status_message);
+ if (presence != TP_CONNECTION_PRESENCE_TYPE_UNSET)
+ empathy_account_request_presence (account, presence, status,
+ status_message);
- g_object_unref (acc_manager);
- g_free (status);
- g_free (status_message);
+ g_object_unref (acc_manager);
+ g_free (status);
+ g_free (status_message);
+ }
g_value_init (&value, G_TYPE_BOOLEAN);
g_value_set_boolean (&value, enabled);