summaryrefslogtreecommitdiff
path: root/libsylph/imap.c
diff options
context:
space:
mode:
Diffstat (limited to 'libsylph/imap.c')
-rw-r--r--libsylph/imap.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/libsylph/imap.c b/libsylph/imap.c
index a61dc2b..0cd4409 100644
--- a/libsylph/imap.c
+++ b/libsylph/imap.c
@@ -707,17 +707,17 @@ static gint imap_session_connect(IMAPSession *session)
707 log_message(_("creating IMAP4 connection to %s:%d ...\n"), 707 log_message(_("creating IMAP4 connection to %s:%d ...\n"),
708 SESSION(session)->server, SESSION(session)->port); 708 SESSION(session)->server, SESSION(session)->port);
709 709
710 if (account->master_password != NULL) { 710 if (prefs_common.use_master_password && account->master_password != NULL) {
711 if (decrypt_data(&pass, 711 if (decrypt_data(&pass,
712 account->passwd, 712 account->passwd,
713 account->master_password, 713 account->master_password,
714 strlen(account->passwd)) != RC_OK) { 714 strlen(account->passwd) + 1) != RC_OK) {
715 session_destroy(session); 715 session_destroy(session);
716 return -1; 716 return -1;
717 } 717 }
718 } else { 718 } else {
719 pass = account->passwd; 719 pass = account->passwd;
720 } 720 }
721 if (!pass) 721 if (!pass)
722 pass = account->tmp_pass; 722 pass = account->tmp_pass;
723 if (!pass) { 723 if (!pass) {
@@ -731,7 +731,6 @@ static gint imap_session_connect(IMAPSession *session)
731 account->tmp_pass = tmp_pass; 731 account->tmp_pass = tmp_pass;
732 pass = account->tmp_pass; 732 pass = account->tmp_pass;
733 } 733 }
734
735 if (account->use_socks && account->use_socks_for_recv && 734 if (account->use_socks && account->use_socks_for_recv &&
736 account->proxy_host) { 735 account->proxy_host) {
737 socks_info = socks_info_new(account->socks_type, account->proxy_host, account->proxy_port, account->use_proxy_auth ? account->proxy_name : NULL, account->use_proxy_auth ? account->proxy_pass : NULL); 736 socks_info = socks_info_new(account->socks_type, account->proxy_host, account->proxy_port, account->use_proxy_auth ? account->proxy_name : NULL, account->use_proxy_auth ? account->proxy_pass : NULL);