(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.
Showing
1 changed file
with
7 additions
and
5 deletions
... | @@ -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 | pop3d_unlock (); | 91 | if (state != AUTHORIZATION) |
92 | mailbox_flush (mbox, 0); | 92 | { |
93 | mailbox_close (mbox); | 93 | pop3d_unlock (); |
94 | mailbox_destroy (&mbox); | 94 | mailbox_flush (mbox, 0); |
95 | mailbox_close (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 | ... | ... |
-
Please register or sign in to post a comment