diff options
author | Magnus Henoch <mange@freemail.hu> | 2008-02-20 01:22:18 +0000 |
---|---|---|
committer | Kirill A. Korinskiy <catap@catap.ru> | 2008-02-20 01:22:18 +0000 |
commit | f0d0ae981c02f3c6c9d2adf79a9ccfed9840b29e (patch) | |
tree | 8337f54db04e1382aade17aa0d3a70ab77a9c3eb /jabber-util.el | |
parent | 5bab846581629b693759545dd4812d17a67b6473 (diff) |
Revision: mange@freemail.hu--2005/emacs-jabber--cvs-head--0--patch-450
Creator: Magnus Henoch <mange@freemail.hu>
Only cache password on successful authentication
Diffstat (limited to 'jabber-util.el')
-rw-r--r-- | jabber-util.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/jabber-util.el b/jabber-util.el index 8fe484d..1c54586 100644 --- a/jabber-util.el +++ b/jabber-util.el @@ -263,12 +263,17 @@ bare-or-muc Turn full JIDs to bare ones, except for in MUC" (defun jabber-read-password (bare-jid) "Read Jabber password from minibuffer." (let ((prompt (format "Jabber password for %s: " bare-jid))) - (if (fboundp 'password-read-and-add) + (if (fboundp 'password-read) ;; Need to copy the password, as sasl.el wants to erase it. (copy-sequence - (password-read-and-add prompt (jabber-password-key bare-jid))) + (password-read prompt (jabber-password-key bare-jid))) (read-passwd prompt)))) +(defun jabber-cache-password (bare-jid password) + "Cache PASSWORD for BARE-JID." + (when (fboundp 'password-cache-add) + (password-cache-add (jabber-password-key bare-jid) password))) + (defun jabber-uncache-password (bare-jid) "Uncache cached password for BARE-JID. Useful if the password proved to be wrong." |