aboutsummaryrefslogtreecommitdiffstats
path: root/mail/session.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-02-26 09:39:11 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-02-26 09:39:11 +0800
commit4b098b1a425fc966c96a61c1c24acb2a2f5645a9 (patch)
tree7c0903ae6db6a2bcaa56f58e80dc8234b738e20e /mail/session.c
parent42904d799377d856cb13363eb2f1530b71d8762f (diff)
downloadgsoc2013-evolution-4b098b1a425fc966c96a61c1c24acb2a2f5645a9.tar
gsoc2013-evolution-4b098b1a425fc966c96a61c1c24acb2a2f5645a9.tar.gz
gsoc2013-evolution-4b098b1a425fc966c96a61c1c24acb2a2f5645a9.tar.bz2
gsoc2013-evolution-4b098b1a425fc966c96a61c1c24acb2a2f5645a9.tar.lz
gsoc2013-evolution-4b098b1a425fc966c96a61c1c24acb2a2f5645a9.tar.xz
gsoc2013-evolution-4b098b1a425fc966c96a61c1c24acb2a2f5645a9.tar.zst
gsoc2013-evolution-4b098b1a425fc966c96a61c1c24acb2a2f5645a9.zip
New function to force the removal of a given password.
2001-02-25 Jeffrey Stedfast <fejj@ximian.com> * session.c (mail_session_forget_password): New function to force the removal of a given password. * openpgp-utils.c (openpgp_decrypt): On failure, forget the passphrase. (openpgp_encrypt): Here too. (cleaned this up a bit too) (openpgp_clearsign): And here. (openpgp_sign): Again... svn path=/trunk/; revision=8390
Diffstat (limited to 'mail/session.c')
-rw-r--r--mail/session.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/mail/session.c b/mail/session.c
index 53c694206b..d8aeaa30ba 100644
--- a/mail/session.c
+++ b/mail/session.c
@@ -169,6 +169,17 @@ mail_session_remember_password (const char *url)
g_hash_table_foreach (passwords, maybe_remember_password, (void *) url);
}
+void
+mail_session_forget_password (const char *key)
+{
+ gpointer okey, value;
+
+ if (g_hash_table_lookup_extended (passwords, key, &okey, &value)) {
+ g_hash_table_remove (passwords, key);
+ g_free (okey);
+ g_free (value);
+ }
+}
/* ******************** */