]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
submission: DATA command: Obtain the size of the buffered data from the stream positi...
authorStephan Bosch <stephan.bosch@dovecot.fi>
Thu, 4 Oct 2018 19:01:44 +0000 (21:01 +0200)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 12 Feb 2019 13:40:41 +0000 (15:40 +0200)
src/submission/submission-commands.c

index 8637a514ae00aa90d59c99747f8334914648b671..62e46216d8b4b08a9155f6bd5184829420a2fbda 100644 (file)
@@ -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);