aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-client-cache.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2014-05-13 01:47:16 +0800
committerMilan Crha <mcrha@redhat.com>2014-05-13 01:47:16 +0800
commitd46ad6d3cd44c3c9b730566cbd7719c2961a9bc9 (patch)
treebdc2d2362021b2da8b8b0eaab55ca28af61122ca /e-util/e-client-cache.c
parent4508696844c20530bdf7fe6150c432eb16a9c77b (diff)
downloadgsoc2013-evolution-d46ad6d3cd44c3c9b730566cbd7719c2961a9bc9.tar
gsoc2013-evolution-d46ad6d3cd44c3c9b730566cbd7719c2961a9bc9.tar.gz
gsoc2013-evolution-d46ad6d3cd44c3c9b730566cbd7719c2961a9bc9.tar.bz2
gsoc2013-evolution-d46ad6d3cd44c3c9b730566cbd7719c2961a9bc9.tar.lz
gsoc2013-evolution-d46ad6d3cd44c3c9b730566cbd7719c2961a9bc9.tar.xz
gsoc2013-evolution-d46ad6d3cd44c3c9b730566cbd7719c2961a9bc9.tar.zst
gsoc2013-evolution-d46ad6d3cd44c3c9b730566cbd7719c2961a9bc9.zip
Bug #678843 - May re-prompt password on account re-enable
Diffstat (limited to 'e-util/e-client-cache.c')
-rw-r--r--e-util/e-client-cache.c20
1 files changed, 20 insertions, 0 deletions
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
@@ -656,6 +656,21 @@ client_cache_cal_connect_cb (GObject *source_object,
}
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,
GWeakRef *weak_ref)
@@ -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);
}