mirror of
https://github.com/moparisthebest/curl
synced 2025-01-11 05:58:01 -05:00
parent
bed5f8454a
commit
3d60a22390
@ -798,7 +798,7 @@ CURLcode Curl_quic_connect(struct connectdata *conn,
|
|||||||
infof(data, "Connect socket %d over QUIC to %s:%ld\n",
|
infof(data, "Connect socket %d over QUIC to %s:%ld\n",
|
||||||
sockfd, ipbuf, port);
|
sockfd, ipbuf, port);
|
||||||
|
|
||||||
qs->version = NGTCP2_PROTO_VER;
|
qs->version = NGTCP2_PROTO_VER_MAX;
|
||||||
#ifdef USE_OPENSSL
|
#ifdef USE_OPENSSL
|
||||||
qs->sslctx = quic_ssl_ctx(data);
|
qs->sslctx = quic_ssl_ctx(data);
|
||||||
if(!qs->sslctx)
|
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.local, &qs->local_addr, qs->local_addrlen, NULL);
|
||||||
ngtcp2_addr_init(&path.remote, addr, addrlen, NULL);
|
ngtcp2_addr_init(&path.remote, addr, addrlen, NULL);
|
||||||
|
|
||||||
#ifdef NGTCP2_PROTO_VER
|
rc = ngtcp2_conn_client_new(&qs->qconn, &qs->dcid, &qs->scid, &path,
|
||||||
#define QUICVER NGTCP2_PROTO_VER
|
NGTCP2_PROTO_VER_MAX, &ng_callbacks,
|
||||||
#else
|
&qs->settings, NULL, qs);
|
||||||
#error "unsupported ngtcp2 version"
|
|
||||||
#endif
|
|
||||||
rc = ngtcp2_conn_client_new(&qs->qconn, &qs->dcid, &qs->scid, &path, QUICVER,
|
|
||||||
&ng_callbacks, &qs->settings, NULL, qs);
|
|
||||||
if(rc)
|
if(rc)
|
||||||
return CURLE_QUIC_CONNECT_ERROR;
|
return CURLE_QUIC_CONNECT_ERROR;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user