From d46ad6d3cd44c3c9b730566cbd7719c2961a9bc9 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 12 May 2014 19:47:16 +0200 Subject: Bug #678843 - May re-prompt password on account re-enable --- e-util/e-client-cache.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'e-util/e-client-cache.c') diff --git a/e-util/e-client-cache.c b/e-util/e-client-cache.c index 215c470a88..19bfa8efd6 100644 --- a/e-util/e-client-cache.c +++ b/e-util/e-client-cache.c @@ -655,6 +655,21 @@ client_cache_cal_connect_cb (GObject *source_object, client_data_unref (client_data); } +static void +client_cache_source_allow_auth_prompt_done_cb (GObject *source_object, + GAsyncResult *result, + gpointer user_data) +{ + GError *local_error = NULL; + + e_source_allow_auth_prompt_finish (E_SOURCE (source_object), result, &local_error); + + if (local_error) { + g_debug ("%s: Failed with: %s", G_STRFUNC, local_error->message); + g_clear_error (&local_error); + } +} + static void client_cache_source_removed_cb (ESourceRegistry *registry, ESource *source, @@ -680,6 +695,11 @@ client_cache_source_disabled_cb (ESourceRegistry *registry, client_cache = g_weak_ref_get (weak_ref); if (client_cache != NULL) { + /* There is not much interest in the result, it just + makes sure a password prompt will be shown the next + time it is needed. */ + e_source_allow_auth_prompt (source, NULL, client_cache_source_allow_auth_prompt_done_cb, NULL); + client_ht_remove (client_cache, source); g_object_unref (client_cache); } -- cgit v1.2.3