2005-01-07 [paul] 0.9.13cvs29.1
[claws.git] / src / pop.c
index f4a7f167a2291893319d92b91abb69173c72facc..98846460a750ff58a1bfc7cbbd8d06f3227f165c 100644 (file)
--- a/src/pop.c
+++ b/src/pop.c
@@ -648,10 +648,10 @@ gint pop3_write_uidl_list(Pop3Session *session)
 
        for (n = 1; n <= session->count; n++) {
                msg = &session->msg[n];
-               if (msg->uidl && msg->received && !msg->deleted) {
+               if (msg->uidl && msg->received &&
+                   (!msg->deleted || session->state != POP3_DONE))
                        fprintf(fp, "%s\t%ld\t%d\n", 
                                msg->uidl, msg->recv_time, msg->partial_recv);
-               }
        }
 
        if (fclose(fp) == EOF) FILE_OP_ERROR(path, "fclose");
@@ -964,6 +964,7 @@ static gint pop3_session_recv_msg(Session *session, const gchar *msg)
                }
                break;
        case POP3_LOGOUT:
+               pop3_session->state = POP3_DONE;
                session_disconnect(session);
                break;
        case POP3_ERROR: