Skip to content

Commit 2981db9

Browse files
authored
To support VSOCK, stop limiting port to 16 bits. (#537)
1 parent f4a52c8 commit 2981db9

13 files changed

+19
-19
lines changed

source/event_stream_rpc_client_connection.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ PyObject *aws_py_event_stream_rpc_client_connection_connect(PyObject *self, PyOb
4646
struct aws_allocator *alloc = aws_py_get_allocator();
4747

4848
const char *host_name;
49-
uint16_t port;
49+
uint32_t port;
5050
PyObject *bootstrap_py;
5151
PyObject *socket_options_py;
5252
PyObject *tls_options_py;
5353
PyObject *connection_py;
5454
if (!PyArg_ParseTuple(
55-
args, "sHOOOO", &host_name, &port, &bootstrap_py, &socket_options_py, &tls_options_py, &connection_py)) {
55+
args, "sIOOOO", &host_name, &port, &bootstrap_py, &socket_options_py, &tls_options_py, &connection_py)) {
5656
return NULL;
5757
}
5858

source/http_connection.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,14 @@ PyObject *aws_py_http_client_connection_new(PyObject *self, PyObject *args) {
163163
PyObject *on_shutdown_py;
164164
const char *host_name;
165165
Py_ssize_t host_name_len;
166-
uint16_t port_number;
166+
uint32_t port_number;
167167
PyObject *socket_options_py;
168168
PyObject *tls_options_py;
169169
PyObject *proxy_options_py;
170170

171171
if (!PyArg_ParseTuple(
172172
args,
173-
"OOOs#HOOO",
173+
"OOOs#IOOO",
174174
&bootstrap_py,
175175
&on_connection_setup_py,
176176
&on_shutdown_py,

source/http_proxy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ bool aws_py_http_proxy_options_init(struct aws_http_proxy_options *proxy_options
2727
goto done;
2828
}
2929

30-
proxy_options->port = PyObject_GetAttrAsUint16(py_proxy_options, "HttpProxyOptions", "port");
30+
proxy_options->port = PyObject_GetAttrAsUint32(py_proxy_options, "HttpProxyOptions", "port");
3131
if (PyErr_Occurred()) {
3232
goto done;
3333
}

0 commit comments

Comments
 (0)