Commit 074789a6 authored by Libor Peltan's avatar Libor Peltan Committed by Daniel Salzman
Browse files

QUIC requestor: nitpicks

parent 8b0ba91c
Pipeline #106545 passed with stages
in 5 minutes and 53 seconds
......@@ -40,11 +40,9 @@ static int quic_exchange(knot_xquic_conn_t *conn, knot_quic_reply_t *r, int time
}
ret = net_dgram_recv(fd, r->in_payload->iov_base, QUIC_BUF_SIZE, timeout_ms);
if (ret <= 0) {
r->in_payload->iov_len = 0; // TODO needed?
if (ret == 0) {
return KNOT_ECONN;
}
if (ret == 0) {
return KNOT_ECONN;
} else if (ret < 0) {
return ret;
}
r->in_payload->iov_len = ret;
......@@ -114,7 +112,7 @@ struct knot_quic_reply *knot_qreq_connect(int fd, struct sockaddr_storage *rem_a
return NULL;
}
knot_xquic_table_t *table = knot_xquic_table_new(1, QUIC_BUF_SIZE, QUIC_BUF_SIZE, 1232 /* FIXME */, creds); // NOTE the limits on conns and buffers do not do anything since we do not sweep
knot_xquic_table_t *table = knot_xquic_table_new(1, QUIC_BUF_SIZE, QUIC_BUF_SIZE, 0, creds); // NOTE the limits on conns and buffers do not do anything since we do not sweep
if (table == NULL) {
knot_xquic_free_creds(creds);
free(r);
......
......@@ -87,7 +87,7 @@ static int request_ensure_connected(knot_request_t *request, bool *reused_fd, in
request->quic_cert, timeout_ms);
if (request->quic_ctx == NULL) {
close(request->fd);
return KNOT_EUNREACH; // FIXME correct code?
return KNOT_ECONN;
}
#else
assert(0);
......
......@@ -650,7 +650,9 @@ static int conn_new(ngtcp2_conn **pconn, const ngtcp2_path *path, const ngtcp2_c
ngtcp2_settings_default(&settings);
settings.initial_ts = now;
settings.log_printf = user_printf;
settings.max_tx_udp_payload_size = udp_pl;
if (udp_pl != 0) {
settings.max_tx_udp_payload_size = udp_pl;
}
settings.qlog.odcid = *odcid;
settings.handshake_timeout = idle_timeout_ns; // NOTE setting handshake timeout to idle_timeout for simplicity
settings.no_pmtud = true;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment