File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -281,7 +281,7 @@ static edgehog_result_t process_uncompressed_chunk(
281281 if (eres != EDGEHOG_RESULT_OK ) {
282282 data -> posix_errno = EIO ;
283283 data -> message = "Failed to write chunk to file" ;
284- return EDGEHOG_RESULT_HTTP_REQUEST_ABORTED ;
284+ return eres ;
285285 }
286286
287287 // Stream the new chunk into the SHA-256 hash operation
Original file line number Diff line number Diff line change 2323/** @brief HTTP request timeout duration in milliseconds. */
2424#define EDGEHOG_FT_HTTP_REQ_TIMEOUT_MS (60 * 1000)
2525
26+ /** @brief Size for the output buffer used to temporarely store the compressed chunk. */
27+ #define EDGEHOG_FT_COMPRESSED_OUT_BUFFER_SIZE 1024
28+
2629/** @brief Unified user data for HTTP callbacks. */
2730typedef struct
2831{
@@ -61,7 +64,7 @@ typedef struct
6164 /** @brief Compression context for outgoing uploaded files */
6265 file_transfer_compression_ctx_t comp_ctx ;
6366 /** @brief Buffer used to hold the compressed output chunk during uploads */
64- uint8_t comp_out_buf [1024 ];
67+ uint8_t comp_out_buf [EDGEHOG_FT_COMPRESSED_OUT_BUFFER_SIZE ];
6568 /** @brief Track if the underlying file is fully read */
6669 bool file_exhausted ;
6770 /** @brief Track if the LZ4 footer has been successfully written */
You can’t perform that action at this time.
0 commit comments