aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-03-16 21:03:40 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-03-17 21:44:27 +0800
commitca9d3b8180e49292724243090fd5394172fa24c9 (patch)
tree56efcf6684eebb33c67a7e5a3a0141ec0d126983 /libempathy
parent7980966fd3bb38fde70946c057704b1b5f409968 (diff)
downloadgsoc2013-empathy-ca9d3b8180e49292724243090fd5394172fa24c9.tar
gsoc2013-empathy-ca9d3b8180e49292724243090fd5394172fa24c9.tar.gz
gsoc2013-empathy-ca9d3b8180e49292724243090fd5394172fa24c9.tar.bz2
gsoc2013-empathy-ca9d3b8180e49292724243090fd5394172fa24c9.tar.lz
gsoc2013-empathy-ca9d3b8180e49292724243090fd5394172fa24c9.tar.xz
gsoc2013-empathy-ca9d3b8180e49292724243090fd5394172fa24c9.tar.zst
gsoc2013-empathy-ca9d3b8180e49292724243090fd5394172fa24c9.zip
save the password before trying to connect the new account (#643690)
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-account-settings.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/libempathy/empathy-account-settings.c b/libempathy/empathy-account-settings.c
index 41f663736..0db28d7a3 100644
--- a/libempathy/empathy-account-settings.c
+++ b/libempathy/empathy-account-settings.c
@@ -1438,6 +1438,9 @@ empathy_account_settings_account_updated (GObject *source,
{
if (priv->password != NULL)
{
+ /* FIXME: we shouldn't save the password if we
+ * can't (MaySaveResponse=False) but we don't have API to check that
+ * at this point (fdo #35382). */
empathy_keyring_set_account_password_async (priv->account, priv->password,
empathy_account_settings_set_password_cb, settings);
}
@@ -1485,6 +1488,19 @@ empathy_account_settings_created_cb (GObject *source,
else
{
priv->account = g_object_ref (account);
+
+ if (priv->supports_sasl && priv->password != NULL)
+ {
+ /* Save the password before connecting */
+ /* FIXME: we shouldn't save the password if we
+ * can't (MaySaveResponse=False) but we don't have API to check that
+ * at this point (fdo #35382). */
+ empathy_keyring_set_account_password_async (priv->account,
+ priv->password, empathy_account_settings_set_password_cb,
+ settings);
+ return;
+ }
+
empathy_account_settings_discard_changes (settings);
}