diff options
| author | Simeon Simeonov | 2018-02-28 23:51:46 +0100 |
|---|---|---|
| committer | Simeon Simeonov | 2018-02-28 23:51:46 +0100 |
| commit | 8de2d887916cbdd3c2d756e77116585babd026f2 (patch) | |
| tree | 15728a8be1602f176ac7d92b09a9eae57b354657 /src/send_message.c | |
| parent | 1bb2a9d33e8cd193c21f9995fb7852c7562cafcf (diff) | |
prefs_common.use_master_password added
Diffstat (limited to 'src/send_message.c')
| -rw-r--r-- | src/send_message.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/send_message.c b/src/send_message.c index 695246a..7b66423 100644 --- a/src/send_message.c +++ b/src/send_message.c | |||
| @@ -649,18 +649,19 @@ static gint send_message_smtp(PrefsAccount *ac_prefs, GSList *to_list, FILE *fp) | |||
| 649 | if (ac_prefs->smtp_userid) { | 649 | if (ac_prefs->smtp_userid) { |
| 650 | smtp_session->user = g_strdup(ac_prefs->smtp_userid); | 650 | smtp_session->user = g_strdup(ac_prefs->smtp_userid); |
| 651 | if (ac_prefs->smtp_passwd) { | 651 | if (ac_prefs->smtp_passwd) { |
| 652 | if(ac_prefs->master_password != NULL) { | 652 | if(prefs_common.use_master_password && |
| 653 | if (decrypt_data(&(smtp_session->pass), | 653 | ac_prefs->master_password != NULL) { |
| 654 | ac_prefs->smtp_passwd, | 654 | if (decrypt_data(&(smtp_session->pass), |
| 655 | ac_prefs->master_password, | 655 | ac_prefs->smtp_passwd, |
| 656 | strlen(ac_prefs->smtp_passwd)) != RC_OK) { | 656 | ac_prefs->master_password, |
| 657 | session_destroy(session); | 657 | strlen(ac_prefs->smtp_passwd) + 1) != RC_OK) { |
| 658 | return -1; | 658 | session_destroy(session); |
| 659 | } | 659 | return -1; |
| 660 | } else { | 660 | } |
| 661 | smtp_session->pass = | 661 | } else { |
| 662 | g_strdup(ac_prefs->smtp_passwd); | 662 | smtp_session->pass = |
| 663 | } | 663 | g_strdup(ac_prefs->smtp_passwd); |
| 664 | } | ||
| 664 | } else if (ac_prefs->tmp_smtp_pass) { | 665 | } else if (ac_prefs->tmp_smtp_pass) { |
| 665 | smtp_session->pass = | 666 | smtp_session->pass = |
| 666 | g_strdup(ac_prefs->tmp_smtp_pass); | 667 | g_strdup(ac_prefs->tmp_smtp_pass); |
