Skip to content

Commit be8baa2

Browse files
committed
added codegen
1 parent 51d859f commit be8baa2

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/s3/s3-crt/S3CrtSpecificOperations.vm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ int S3CrtClient::S3CrtRequestGetBodyCallback(struct aws_s3_meta_request *meta_re
5757
{
5858
bodyStream.flush();
5959
}
60+
if (bodyStream.fail()) {
61+
AWS_LOGSTREAM_ERROR(ALLOCATION_TAG, "Failed to write download data");
62+
aws_raise_error(AWS_ERROR_FILE_WRITE_FAILURE);
63+
return AWS_OP_ERR;
64+
}
6065

6166
// Replenish flow-control window (no-op if enable_read_backpressure is not set):
6267
aws_s3_meta_request_increment_read_window(meta_request, body->len);

tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/s3/s3-crt/SmithyS3CrtSpecificOperations.vm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ int S3CrtClient::S3CrtRequestGetBodyCallback(struct aws_s3_meta_request *meta_re
5757
{
5858
bodyStream.flush();
5959
}
60+
if (bodyStream.fail()) {
61+
AWS_LOGSTREAM_ERROR(ALLOCATION_TAG, "Failed to write download data");
62+
aws_raise_error(AWS_ERROR_FILE_WRITE_FAILURE);
63+
return AWS_OP_ERR;
64+
}
6065

6166
// Replenish flow-control window (no-op if enable_read_backpressure is not set):
6267
aws_s3_meta_request_increment_read_window(meta_request, body->len);

0 commit comments

Comments
 (0)