diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-09-25 08:17:49 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-09-25 08:59:43 +0200 |
commit | 3d60a223908fcfebea7f8099b6e8e62bf31b0a9c (patch) | |
tree | 7a34db8ae67de466895813d9bac7d82ae9f4131c | |
parent | bed5f8454a4b673ab4103901362fbd7b3e0aa754 (diff) | |
download | curl-3d60a223908fcfebea7f8099b6e8e62bf31b0a9c.tar.gz |
ngtcp2: adapt to new NGTCP2_PROTO_VER_MAX define
Closes #6012
-rw-r--r-- | lib/vquic/ngtcp2.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/vquic/ngtcp2.c b/lib/vquic/ngtcp2.c index 98efdf143..c076b7c3e 100644 --- a/lib/vquic/ngtcp2.c +++ b/lib/vquic/ngtcp2.c @@ -798,7 +798,7 @@ CURLcode Curl_quic_connect(struct connectdata *conn, infof(data, "Connect socket %d over QUIC to %s:%ld\n", sockfd, ipbuf, port); - qs->version = NGTCP2_PROTO_VER; + qs->version = NGTCP2_PROTO_VER_MAX; #ifdef USE_OPENSSL qs->sslctx = quic_ssl_ctx(data); if(!qs->sslctx) @@ -831,13 +831,9 @@ CURLcode Curl_quic_connect(struct connectdata *conn, ngtcp2_addr_init(&path.local, &qs->local_addr, qs->local_addrlen, NULL); ngtcp2_addr_init(&path.remote, addr, addrlen, NULL); -#ifdef NGTCP2_PROTO_VER -#define QUICVER NGTCP2_PROTO_VER -#else -#error "unsupported ngtcp2 version" -#endif - rc = ngtcp2_conn_client_new(&qs->qconn, &qs->dcid, &qs->scid, &path, QUICVER, - &ng_callbacks, &qs->settings, NULL, qs); + rc = ngtcp2_conn_client_new(&qs->qconn, &qs->dcid, &qs->scid, &path, + NGTCP2_PROTO_VER_MAX, &ng_callbacks, + &qs->settings, NULL, qs); if(rc) return CURLE_QUIC_CONNECT_ERROR; |