Commit bbaf9dee bbaf9deecb52b7a3d219dfbb63970a9b1286b08e by Sergey Poznyakoff

split imap4d_bye() into imap4d_bye() and imap4d_bye().

1 parent 0ca1c505
......@@ -21,6 +21,12 @@
int
imap4d_bye (int reason)
{
return imap4d_bye0 (reason, NULL);
}
int
imap4d_bye0 (int reason, struct imap4d_command *command)
{
struct passwd *pw = getpwuid (getuid ());
const char *username;
int status = EXIT_FAILURE;
......@@ -41,7 +47,8 @@ imap4d_bye (int reason)
break;
case ERR_SIGNAL:
util_out (RESP_BYE, "Quitting on signal");
if (ofile)
util_out (RESP_BYE, "Quitting on signal");
syslog (LOG_ERR, "Quitting on signal");
break;
......@@ -72,6 +79,10 @@ imap4d_bye (int reason)
break;
}
if (status == EXIT_SUCCESS && command)
util_finish (command, RESP_OK, "Completed");
closelog ();
exit (status);
}
......