Skip to content

Commit

Permalink
Change port from uint16_t to uint32_t, to support VSOCK (#394)
Browse files Browse the repository at this point in the history
  • Loading branch information
graebm authored Dec 30, 2023
1 parent 7dd72a9 commit 1dd55be
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion include/aws/s3/private/s3_client_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ struct aws_s3_endpoint_options {
uint32_t max_connections;

/* HTTP port override. If zero, determine port based on TLS context */
uint16_t port;
uint32_t port;

/**
* Optional.
Expand Down
2 changes: 1 addition & 1 deletion source/s3_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ struct aws_s3_meta_request *aws_s3_client_make_meta_request(
AWS_FATAL_ASSERT(aws_http_headers_get(message_headers, g_host_header_name, &host_header_value) == AWS_OP_SUCCESS);

bool is_https = true;
uint16_t port = 0;
uint32_t port = 0;

if (options->endpoint != NULL) {
struct aws_byte_cursor https_scheme = aws_byte_cursor_from_c_str("https");
Expand Down
8 changes: 4 additions & 4 deletions source/s3_endpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
#include <inttypes.h>

static const uint32_t s_connection_timeout_ms = 3000;
static const uint16_t s_http_port = 80;
static const uint16_t s_https_port = 443;
static const uint32_t s_http_port = 80;
static const uint32_t s_https_port = 443;

static void s_s3_endpoint_on_host_resolver_address_resolved(
struct aws_host_resolver *resolver,
Expand All @@ -39,7 +39,7 @@ static struct aws_http_connection_manager *s_s3_endpoint_create_http_connection_
struct aws_client_bootstrap *client_bootstrap,
const struct aws_tls_connection_options *tls_connection_options,
uint32_t max_connections,
uint16_t port,
uint32_t port,
const struct aws_http_proxy_config *proxy_config,
const struct proxy_env_var_settings *proxy_ev_settings,
uint32_t connect_timeout_ms,
Expand Down Expand Up @@ -136,7 +136,7 @@ static struct aws_http_connection_manager *s_s3_endpoint_create_http_connection_
struct aws_client_bootstrap *client_bootstrap,
const struct aws_tls_connection_options *tls_connection_options,
uint32_t max_connections,
uint16_t port,
uint32_t port,
const struct aws_http_proxy_config *proxy_config,
const struct proxy_env_var_settings *proxy_ev_settings,
uint32_t connect_timeout_ms,
Expand Down

0 comments on commit 1dd55be

Please sign in to comment.