]> granicus.if.org Git - mutt/commitdiff
Attached patch fixes the problem described below. It should be
authorVsevolod Volkov <vvv@mutt.org.ua>
Thu, 25 Apr 2002 13:30:10 +0000 (13:30 +0000)
committerVsevolod Volkov <vvv@mutt.org.ua>
Thu, 25 Apr 2002 13:30:10 +0000 (13:30 +0000)
applied to both mutt 1.3/1.4 and 1.5 branches.

> Date: Thu, 11 Apr 2002 16:24:00 -0500
> Subject: mutt 1.3.x / pop
> From: "Ryan O'Hara" <rohara@isis.visi.com>
> To: bcully@users.sourceforge.net
> User-Agent: Mutt/1.3.27i

> Hi. My apologies if this has nothing to do with you. If it does not,
> maybe you could forward it on to someone.

> In mutt 1.3.x I have noticed that if I uses POP to retrieve mail, and
> I enter an incorrect password whem prompted, it will *save* that
> password and keep trying to use it. However, in the 1.2.x versions it
> worked like this: type in wrong POP password, try to connect to POP
> server again and it will ask you (again) for the password. mutt 1.3.x
> does not, it just tries to connect with the wrongs password (which
> just failed).

> This is kinda annoying. Just thought I'd point out this regression.

> Thanks.
> R

pop.c
pop_lib.c

diff --git a/pop.c b/pop.c
index 2bb645f046088f0a7ccf2cbe848c8e470c9f5825..637dc26bea4f10cf0dfa6e6d5700a952d9137dd2 100644 (file)
--- a/pop.c
+++ b/pop.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2000-2001 Vsevolod Volkov <vvv@mutt.org.ua>
+ * Copyright (C) 2000-2002 Vsevolod Volkov <vvv@mutt.org.ua>
  * 
  *     This program is free software; you can redistribute it and/or modify
  *     it under the terms of the GNU General Public License as published by
@@ -576,6 +576,7 @@ void pop_fetch_mail (void)
 
   if (pop_open_connection (pop_data) < 0)
   {
+    mutt_socket_free (pop_data->conn);
     FREE (&pop_data);
     return;
   }
index b9c9f17d35f202bbeb1e6ecd54e1b0c0afd7818a..ad1fefcd71d366238ff5fcb803a67a1b101ccbd4 100644 (file)
--- a/pop_lib.c
+++ b/pop_lib.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2000 Vsevolod Volkov <vvv@mutt.org.ua>
+ * Copyright (C) 2000-2002 Vsevolod Volkov <vvv@mutt.org.ua>
  * 
  *     This program is free software; you can redistribute it and/or modify
  *     it under the terms of the GNU General Public License as published by
@@ -251,6 +251,8 @@ int pop_open_connection (POP_DATA *pop_data)
   ret = pop_authenticate (pop_data);
   if (ret == -1)
     goto err_conn;
+  if (ret == -3)
+    mutt_clear_error ();
   if (ret != 0)
     return ret;