From: Stephan Bosch Date: Thu, 4 Oct 2018 19:01:44 +0000 (+0200) Subject: submission: DATA command: Obtain the size of the buffered data from the stream positi... X-Git-Tag: 2.3.9~1292 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8569e12b947d5b2cbd118d72b7ba6e0a0d7951b;p=thirdparty%2Fdovecot%2Fcore.git submission: DATA command: Obtain the size of the buffered data from the stream position rather than using i_stream_get_size(). --- diff --git a/src/submission/submission-commands.c b/src/submission/submission-commands.c index 8637a514ae..62e46216d8 100644 --- a/src/submission/submission-commands.c +++ b/src/submission/submission-commands.c @@ -188,9 +188,8 @@ int cmd_data_continue(void *conn_ctx, struct smtp_server_cmd_ctx *cmd, local variable. */ client->state.data_input = NULL; - ret = i_stream_get_size(data_input, TRUE, - &client->state.data_size); - i_assert(ret > 0); // FIXME + /* Current data stream position is the data size */ + client->state.data_size = data_input->v_offset; /* prepend our own headers */ added_headers = t_str_new(200);