Skip to content

Commit fcd5a68

Browse files
author
Krish
committed
corrections
1 parent fba4cf0 commit fcd5a68

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

include/aws/s3/private/s3_client_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ struct aws_s3_client {
277277

278278
/* Tokens added when meta requests are created and subtracted when requests use the tokens to allocate connections
279279
*/
280-
struct struct_atomic_var token_bucket;
280+
struct aws_atomic_var token_bucket;
281281

282282
/**
283283
* For multi-part upload, content-md5 will be calculated if the AWS_MR_CONTENT_MD5_ENABLED is specified

source/s3_client.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -277,12 +277,12 @@ void s_s3_client_release_tokens(struct aws_s3_client *client, struct aws_s3_requ
277277
break;
278278
}
279279
default: {
280-
tokens = g_default_min_tokens;
280+
tokens = s_s3_minimum_tokens;
281281
}
282282
}
283283

284284
// do we need error handling here?
285-
aws_atomic_fetch_add(client->token_bucket, tokens);
285+
aws_atomic_fetch_add(&client->token_bucket, tokens);
286286
}
287287

288288
/* Returns true or false based on whether the request was able to avail the required amount of tokens.
@@ -319,13 +319,13 @@ bool s_s3_client_acquire_tokens(struct aws_s3_client *client, struct aws_s3_requ
319319
break;
320320
}
321321
default: {
322-
required_tokens = g_default_min_tokens;
322+
required_tokens = s_s3_minimum_tokens;
323323
}
324324
}
325325

326-
if ((uint32_t *)aws_atomic_load_int(&client->token_bucket) > required_tokens) {
326+
if ((uint32_t)aws_atomic_load_int(&client->token_bucket) > required_tokens) {
327327
// do we need error handling here?
328-
aws_atomic_fetch_sub(client->token_bucket, required_tokens);
328+
aws_atomic_fetch_sub(&client->token_bucket, required_tokens);
329329
return true;
330330
}
331331
return false;
@@ -2393,7 +2393,7 @@ void aws_s3_client_update_connections_threaded(struct aws_s3_client *client) {
23932393

23942394
struct aws_s3_request *request = aws_s3_client_dequeue_request_threaded(client);
23952395
struct aws_s3_meta_request *meta_request = request->meta_request;
2396-
const uint32_t max_active_connections = aws_s3_client_get_max_active_connections(client, meta_request);
2396+
23972397
if (request->is_noop) {
23982398
/* If request is no-op, finishes and cleans up the request */
23992399
s_s3_client_meta_request_finished_request(client, meta_request, request, AWS_ERROR_SUCCESS);

0 commit comments

Comments
 (0)