diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2010-12-06 18:06:51 +0800 |
---|---|---|
committer | Jonny Lamb <jonnylamb@gnome.org> | 2011-01-26 21:29:28 +0800 |
commit | 9c4cdfa994ecb28911b0fe714a99803b2e51f719 (patch) | |
tree | 6399fa8bb7dcc218f0a9309286a2d24d8e593558 /libempathy | |
parent | 4e3f8354165c37e1d8fc236b7d6417f77931bba3 (diff) | |
download | gsoc2013-empathy-9c4cdfa994ecb28911b0fe714a99803b2e51f719.tar gsoc2013-empathy-9c4cdfa994ecb28911b0fe714a99803b2e51f719.tar.gz gsoc2013-empathy-9c4cdfa994ecb28911b0fe714a99803b2e51f719.tar.bz2 gsoc2013-empathy-9c4cdfa994ecb28911b0fe714a99803b2e51f719.tar.lz gsoc2013-empathy-9c4cdfa994ecb28911b0fe714a99803b2e51f719.tar.xz gsoc2013-empathy-9c4cdfa994ecb28911b0fe714a99803b2e51f719.tar.zst gsoc2013-empathy-9c4cdfa994ecb28911b0fe714a99803b2e51f719.zip |
server-sasl-handler: save the password if requested
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'libempathy')
-rw-r--r-- | libempathy/empathy-server-sasl-handler.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/libempathy/empathy-server-sasl-handler.c b/libempathy/empathy-server-sasl-handler.c index b71cbdb7b..d9f504942 100644 --- a/libempathy/empathy-server-sasl-handler.c +++ b/libempathy/empathy-server-sasl-handler.c @@ -359,6 +359,25 @@ start_mechanism_with_data_cb (TpChannel *proxy, DEBUG ("Started mechanism successfully"); } +static void +empathy_server_sasl_handler_set_password_cb (GObject *source, + GAsyncResult *result, + gpointer user_data) +{ + GError *error = NULL; + + if (!empathy_keyring_set_password_finish (TP_ACCOUNT (source), result, + &error)) + { + DEBUG ("Failed to set password: %s", error->message); + g_clear_error (&error); + } + else + { + DEBUG ("Password set successfully."); + } +} + void empathy_server_sasl_handler_provide_password ( EmpathyServerSASLHandler *handler, @@ -389,7 +408,8 @@ empathy_server_sasl_handler_provide_password ( if (remember) { - /* TODO */ + empathy_keyring_set_password_async (priv->account, password, + empathy_server_sasl_handler_set_password_cb, NULL); } } |