Commit 34286779 34286779f9eac20b5f5f62bae78f40ec365ce007 by Sergey Poznyakoff

(pop3d_abquit): Flush and close the mailbox

only unless we're not in the AUTHORIZATION state.
Do not attempt to write to the output stream if a signal was
caught.
1 parent 6ba44162
...@@ -88,10 +88,13 @@ int ...@@ -88,10 +88,13 @@ int
88 pop3d_abquit (int reason) 88 pop3d_abquit (int reason)
89 { 89 {
90 /* Unlock spool */ 90 /* Unlock spool */
91 if (state != AUTHORIZATION)
92 {
91 pop3d_unlock (); 93 pop3d_unlock ();
92 mailbox_flush (mbox, 0); 94 mailbox_flush (mbox, 0);
93 mailbox_close (mbox); 95 mailbox_close (mbox);
94 mailbox_destroy (&mbox); 96 mailbox_destroy (&mbox);
97 }
95 98
96 switch (reason) 99 switch (reason)
97 { 100 {
...@@ -101,7 +104,6 @@ pop3d_abquit (int reason) ...@@ -101,7 +104,6 @@ pop3d_abquit (int reason)
101 break; 104 break;
102 105
103 case ERR_SIGNAL: 106 case ERR_SIGNAL:
104 pop3d_outf ("-ERR Quitting on signal\r\n");
105 syslog (LOG_ERR, _("Quitting on signal")); 107 syslog (LOG_ERR, _("Quitting on signal"));
106 break; 108 break;
107 109
......