projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rocco Rutte:
[apps/madmutt.git]
/
account.c
diff --git
a/account.c
b/account.c
index
aff9d3a
..
b96de37
100644
(file)
--- a/
account.c
+++ b/
account.c
@@
-176,15
+176,18
@@
int mutt_account_getlogin (ACCOUNT* account)
#ifdef USE_IMAP
else if (account->type == M_ACCT_TYPE_IMAP)
{
#ifdef USE_IMAP
else if (account->type == M_ACCT_TYPE_IMAP)
{
- if (ImapLogin)
+ if (ImapLogin)
{
strfcpy (account->login, ImapLogin, sizeof (account->login));
strfcpy (account->login, ImapLogin, sizeof (account->login));
- else {
- mutt_account_getuser (account);
- strfcpy (account->login, account->user, sizeof (account->login));
+ account->flags |= M_ACCT_LOGIN;
}
}
#endif
}
}
#endif
+ if (!(account->flags & M_ACCT_LOGIN)) {
+ mutt_account_getuser (account);
+ strfcpy (account->login, account->user, sizeof (account->login));
+ }
+
account->flags |= M_ACCT_LOGIN;
return 0;
account->flags |= M_ACCT_LOGIN;
return 0;
@@
-211,7
+214,8
@@
int mutt_account_getpass (ACCOUNT * account)
#endif
else {
snprintf (prompt, sizeof (prompt), _("Password for %s@%s: "),
#endif
else {
snprintf (prompt, sizeof (prompt), _("Password for %s@%s: "),
- account->login, account->host);
+ account->flags & M_ACCT_LOGIN ? account->login : account->user,
+ account->host);
account->pass[0] = '\0';
if (mutt_get_password (prompt, account->pass, sizeof (account->pass)))
return -1;
account->pass[0] = '\0';
if (mutt_get_password (prompt, account->pass, sizeof (account->pass)))
return -1;