Fix against hang when pop3 login fails

This commit is contained in:
Michiel Broek
2004-06-24 19:43:42 +00:00
parent 41b1428c5f
commit 8efb45e7a3
3 changed files with 69 additions and 62 deletions

View File

@@ -43,10 +43,6 @@
void error_popmail(char *);
void error_popmail(char *umsg)
{
char *p;
pop3_send((char *)"QUIT\r\n");
p = pop3_receive();
pop3_close();
colour(LIGHTRED, BLACK);
printf("%s\r\n", umsg);
@@ -136,7 +132,10 @@ void check_popmail(char *user, char *pass)
/*
* If nothing is retrieved from the POP3 mailbox, the user sees nothing.
*/
Syslog('+', "POP3: connect user %s", user);
if (CFG.UsePopDomain)
Syslog('+', "POP3: connect user %s@%s", user, CFG.sysdomain);
else
Syslog('+', "POP3: connect user %s", user);
if (pop3_connect() == -1) {
WriteError("Can't connect POP3 server");
return;