diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-03-16 21:03:40 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-03-17 21:53:22 +0800 |
commit | 8e687238e7689097a541e387b18abd611b179faf (patch) | |
tree | 44d7ff4df884df8d21f56b1311aaba417f0cabf8 /libempathy | |
parent | 9900a3a35d66a9e00ea82dee37895f7d8b54faa3 (diff) | |
download | gsoc2013-empathy-8e687238e7689097a541e387b18abd611b179faf.tar gsoc2013-empathy-8e687238e7689097a541e387b18abd611b179faf.tar.gz gsoc2013-empathy-8e687238e7689097a541e387b18abd611b179faf.tar.bz2 gsoc2013-empathy-8e687238e7689097a541e387b18abd611b179faf.tar.lz gsoc2013-empathy-8e687238e7689097a541e387b18abd611b179faf.tar.xz gsoc2013-empathy-8e687238e7689097a541e387b18abd611b179faf.tar.zst gsoc2013-empathy-8e687238e7689097a541e387b18abd611b179faf.zip |
save the password before trying to connect the new account (#643690)
Diffstat (limited to 'libempathy')
-rw-r--r-- | libempathy/empathy-account-settings.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libempathy/empathy-account-settings.c b/libempathy/empathy-account-settings.c index 052a0734d..2a9afabb3 100644 --- a/libempathy/empathy-account-settings.c +++ b/libempathy/empathy-account-settings.c @@ -1379,6 +1379,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_password_async (priv->account, priv->password, empathy_account_settings_set_password_cb, settings); } @@ -1426,6 +1429,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_password_async (priv->account, + priv->password, empathy_account_settings_set_password_cb, + settings); + return; + } + empathy_account_settings_discard_changes (settings); } |