cmd-append.c revision 2f3d26e180a669116e1d456bd6dfdf5d0d3b0a40
b4c47b77878eb0eaaeb1e377de936a77fad4d144Aki Tuomi/* Copyright (C) 2002 Timo Sirainen */
57614d9fe04311072508a2185472bdb977631c5dAki Tuomistatic void cmd_append_finish(struct cmd_append_context *ctx);
c865b0e9c65fd77f7b2ab6f8616d3def5501ecb3Timo Sirainenstatic bool cmd_append_continue_message(struct client_command_context *cmd);
f9511e684858bf5f6ac77ab12254b85b737beae8Stephan Boschstatic void client_input(struct client_command_context *cmd)
8e0e5842b5841cf3065ed18e8ba093b11517c51dTimo Sirainen struct cmd_append_context *ctx = cmd->context;
17fc2a887a5683b2e1bbd6bd9fdf0cdb97b509fbTimo Sirainen /* disconnected */
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo Sirainen /* Reset command so that client_destroy() doesn't try to call
a7c6667c80d7363f5110ec1ab1ae9198833411d3Timo Sirainen cmd_append_continue_message() anymore. */
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen client_destroy(client, "Disconnected in APPEND");
52cb31b413be19de11cdf9ad84b9ccde7740b5cfTimo Sirainen /* message data, this is handled internally by
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainen mailbox_save_continue() */
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen /* parameter word is longer than max. input buffer size.
447e086422f1ab7cc16833583ed70a4af7a84bc5Timo Sirainen this is most likely an error, so skip the new data
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen until newline is found. */
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen client_send_command_error(cmd, "Too long argument.");
bool *nonsync)
args++;
args++;
return FALSE;
return TRUE;
return TRUE;
return TRUE;
return FALSE;
if (!nonsync) {
return TRUE;
const char *const *keywords_list;
const char *internal_date_str;
bool nonsync;
return TRUE;
return TRUE;
if (ret < 0) {
return FALSE;
return TRUE;
if (ret < 0) {
return TRUE;
flags = 0;
timezone_offset = 0;
return TRUE;
if (ret < 0) {
if (!nonsync) {
bool failed;
int ret;
return TRUE;
} else if (!all_written) {
if (failed) {
return TRUE;
return FALSE;
static struct mailbox *
return NULL;
return NULL;
return NULL;
return box;
const char *mailbox;
return FALSE;
&status) < 0) {