Skip to content

Commit

Permalink
rename error
Browse files Browse the repository at this point in the history
  • Loading branch information
waahm7 committed Dec 12, 2023
1 parent e0f41d6 commit f926dbd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion include/aws/s3/private/s3_auto_ranged_get.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

enum aws_s3_auto_ranged_get_request_type {
AWS_S3_AUTO_RANGE_GET_REQUEST_TYPE_HEAD_OBJECT,
AWS_S3_AUTO_RANGE_GET_REQUEST_TYPE_GET_RANGE,
AWS_S3_AUTO_RANGE_GET_REQUEST_TYPE_GET_RANGED,
AWS_S3_AUTO_RANGE_GET_REQUEST_TYPE_INITIAL_MESSAGE,
AWS_S3_AUTO_RANGE_GET_REQUEST_TYPE_GET_PART_NUMBER,
};
Expand Down
16 changes: 8 additions & 8 deletions source/s3_auto_ranged_get.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ static enum aws_s3_auto_ranged_get_request_type s_s3_get_request_type_for_discov

/* If we don't need checksum validation, then discover the size of the object while trying to get the first part. */
if (!meta_request->checksum_config.validate_response_checksum) {
return AWS_S3_AUTO_RANGE_GET_REQUEST_TYPE_GET_RANGE;
return AWS_S3_AUTO_RANGE_GET_REQUEST_TYPE_GET_RANGED;
}

/* If the object_size_hint indicates that it is a small one part file, then try to get the file directly
Expand Down Expand Up @@ -223,7 +223,7 @@ static bool s_s3_auto_ranged_get_update(
++auto_ranged_get->synced_data.num_parts_requested;

break;
case AWS_S3_AUTO_RANGE_GET_REQUEST_TYPE_GET_RANGE:
case AWS_S3_AUTO_RANGE_GET_REQUEST_TYPE_GET_RANGED:
AWS_LOGF_INFO(
AWS_LS_S3_META_REQUEST,
"id=%p: Doing a ranged get to discover the size of the object and get the first part",
Expand All @@ -236,7 +236,7 @@ static bool s_s3_auto_ranged_get_update(

request = aws_s3_request_new(
meta_request,
AWS_S3_AUTO_RANGE_GET_REQUEST_TYPE_GET_RANGE,
AWS_S3_AUTO_RANGE_GET_REQUEST_TYPE_GET_RANGED,
AWS_S3_REQUEST_TYPE_GET_OBJECT,
1 /*part_number*/,
AWS_S3_REQUEST_FLAG_RECORD_RESPONSE_HEADERS | AWS_S3_REQUEST_FLAG_PART_SIZE_RESPONSE_BODY);
Expand Down Expand Up @@ -315,7 +315,7 @@ static bool s_s3_auto_ranged_get_update(

request = aws_s3_request_new(
meta_request,
AWS_S3_AUTO_RANGE_GET_REQUEST_TYPE_GET_RANGE,
AWS_S3_AUTO_RANGE_GET_REQUEST_TYPE_GET_RANGED,
AWS_S3_REQUEST_TYPE_GET_OBJECT,
auto_ranged_get->synced_data.num_parts_requested + 1 /*part_number*/,
AWS_S3_REQUEST_FLAG_PART_SIZE_RESPONSE_BODY);
Expand Down Expand Up @@ -432,7 +432,7 @@ static struct aws_future_void *s_s3_auto_ranged_get_prepare_request(struct aws_s
aws_http_message_set_request_method(message, g_head_method);
}
break;
case AWS_S3_AUTO_RANGE_GET_REQUEST_TYPE_GET_RANGE:
case AWS_S3_AUTO_RANGE_GET_REQUEST_TYPE_GET_RANGED:
message = aws_s3_ranged_get_object_message_new(
meta_request->allocator,
meta_request->initial_request_message,
Expand Down Expand Up @@ -629,7 +629,7 @@ static int s_discover_object_range_and_content_length(

result = AWS_OP_SUCCESS;
break;
case AWS_S3_AUTO_RANGE_GET_REQUEST_TYPE_GET_RANGE:
case AWS_S3_AUTO_RANGE_GET_REQUEST_TYPE_GET_RANGED:
AWS_ASSERT(request->part_number == 1);

if (error_code != AWS_ERROR_SUCCESS) {
Expand Down Expand Up @@ -755,7 +755,7 @@ static void s_s3_auto_ranged_get_request_finished(
copy_http_headers(request->send_data.response_headers, response_headers);

/* If this request is a part, then the content range isn't applicable. */
if (request->request_tag == AWS_S3_AUTO_RANGE_GET_REQUEST_TYPE_GET_RANGE ||
if (request->request_tag == AWS_S3_AUTO_RANGE_GET_REQUEST_TYPE_GET_RANGED ||
request->request_tag == AWS_S3_AUTO_RANGE_GET_REQUEST_TYPE_GET_PART_NUMBER) {
/* For now, we can assume that discovery of size via the first part of the object does not apply to
* breaking up a ranged request. If it ever does, then we will need to repopulate this header. */
Expand Down Expand Up @@ -818,7 +818,7 @@ static void s_s3_auto_ranged_get_request_finished(
break;
}
/* fall through */
case AWS_S3_AUTO_RANGE_GET_REQUEST_TYPE_GET_RANGE:
case AWS_S3_AUTO_RANGE_GET_REQUEST_TYPE_GET_RANGED:
++auto_ranged_get->synced_data.num_parts_completed;

if (!request_failed) {
Expand Down

0 comments on commit f926dbd

Please sign in to comment.