From: Jay Satiro Date: Mon, 1 Feb 2021 07:40:42 +0000 (-0500) Subject: ngtcp2: Fix build error due to change in ngtcp2_settings X-Git-Tag: curl-7_75_0~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fc9d3444d1a72e2e1865006d13fe8e604abba4a2;p=thirdparty%2Fcurl.git ngtcp2: Fix build error due to change in ngtcp2_settings - Separate ngtcp2_transport_params. ngtcp2/ngtcp2@05d7adc made ngtcp2_transport_params separate from ngtcp2_settings. ngtcp2 master is required to build curl with http3 support. Closes #6554 --- diff --git a/lib/vquic/ngtcp2.c b/lib/vquic/ngtcp2.c index f8b338b3bc..d4d0e8bf43 100644 --- a/lib/vquic/ngtcp2.c +++ b/lib/vquic/ngtcp2.c @@ -170,20 +170,22 @@ static void quic_settings(struct quicsocket *qs, uint64_t stream_buffer_size) { ngtcp2_settings *s = &qs->settings; + ngtcp2_transport_params *t = &qs->transport_params; ngtcp2_settings_default(s); + ngtcp2_transport_params_default(t); #ifdef DEBUG_NGTCP2 s->log_printf = quic_printf; #else s->log_printf = NULL; #endif s->initial_ts = timestamp(); - s->transport_params.initial_max_stream_data_bidi_local = stream_buffer_size; - s->transport_params.initial_max_stream_data_bidi_remote = QUIC_MAX_STREAMS; - s->transport_params.initial_max_stream_data_uni = QUIC_MAX_STREAMS; - s->transport_params.initial_max_data = QUIC_MAX_DATA; - s->transport_params.initial_max_streams_bidi = 1; - s->transport_params.initial_max_streams_uni = 3; - s->transport_params.max_idle_timeout = QUIC_IDLE_TIMEOUT; + t->initial_max_stream_data_bidi_local = stream_buffer_size; + t->initial_max_stream_data_bidi_remote = QUIC_MAX_STREAMS; + t->initial_max_stream_data_uni = QUIC_MAX_STREAMS; + t->initial_max_data = QUIC_MAX_DATA; + t->initial_max_streams_bidi = 1; + t->initial_max_streams_uni = 3; + t->max_idle_timeout = QUIC_IDLE_TIMEOUT; if(qs->qlogfd != -1) { s->qlog.write = qlog_callback; } @@ -810,7 +812,7 @@ CURLcode Curl_quic_connect(struct Curl_easy *data, rc = ngtcp2_conn_client_new(&qs->qconn, &qs->dcid, &qs->scid, &path, NGTCP2_PROTO_VER_MIN, &ng_callbacks, - &qs->settings, NULL, qs); + &qs->settings, &qs->transport_params, NULL, qs); if(rc) return CURLE_QUIC_CONNECT_ERROR; diff --git a/lib/vquic/ngtcp2.h b/lib/vquic/ngtcp2.h index 102ff22e13..8b6f57029b 100644 --- a/lib/vquic/ngtcp2.h +++ b/lib/vquic/ngtcp2.h @@ -48,6 +48,7 @@ struct quicsocket { ngtcp2_cid scid; uint32_t version; ngtcp2_settings settings; + ngtcp2_transport_params transport_params; #ifdef USE_OPENSSL SSL_CTX *sslctx; SSL *ssl;