Compile with the latest ngtcp2

This commit is contained in:
Tatsuhiro Tsujikawa 2022-01-11 19:40:26 +09:00
parent 02e6cad121
commit d91ae6987d
3 changed files with 7 additions and 6 deletions

View File

@ -535,12 +535,12 @@ void Client::quic_close_connection() {
case quic::ErrorType::Transport:
nwrite = ngtcp2_conn_write_connection_close(
quic.conn, &ps.path, nullptr, buf.data(), buf.size(),
quic.last_error.code, timestamp(worker->loop));
quic.last_error.code, nullptr, 0, timestamp(worker->loop));
break;
case quic::ErrorType::Application:
nwrite = ngtcp2_conn_write_application_close(
quic.conn, &ps.path, nullptr, buf.data(), buf.size(),
quic.last_error.code, timestamp(worker->loop));
quic.last_error.code, nullptr, 0, timestamp(worker->loop));
break;
default:
assert(0);

View File

@ -1406,7 +1406,7 @@ void Http3Upstream::on_handler_delete() {
auto nwrite = ngtcp2_conn_write_connection_close(
conn_, &ps.path, &pi, conn_close_.data(), conn_close_.size(),
NGTCP2_NO_ERROR, quic_timestamp());
NGTCP2_NO_ERROR, nullptr, 0, quic_timestamp());
if (nwrite < 0) {
if (nwrite != NGTCP2_ERR_INVALID_STATE) {
ULOG(ERROR, this) << "ngtcp2_conn_write_connection_close: "
@ -1764,7 +1764,7 @@ int Http3Upstream::handle_error() {
if (last_error_.type == quic::ErrorType::Transport) {
nwrite = ngtcp2_conn_write_connection_close(
conn_, &ps.path, &pi, conn_close_.data(), conn_close_.size(),
last_error_.code, ts);
last_error_.code, nullptr, 0, ts);
if (nwrite < 0) {
ULOG(ERROR, this) << "ngtcp2_conn_write_connection_close: "
<< ngtcp2_strerror(nwrite);
@ -1773,7 +1773,7 @@ int Http3Upstream::handle_error() {
} else {
nwrite = ngtcp2_conn_write_application_close(
conn_, &ps.path, &pi, conn_close_.data(), conn_close_.size(),
last_error_.code, ts);
last_error_.code, nullptr, 0, ts);
if (nwrite < 0) {
ULOG(ERROR, this) << "ngtcp2_conn_write_application_close: "
<< ngtcp2_strerror(nwrite);

View File

@ -615,7 +615,8 @@ int QUICConnectionHandler::send_connection_close(
std::array<uint8_t, NGTCP2_MAX_UDP_PAYLOAD_SIZE> buf;
auto nwrite = ngtcp2_crypto_write_connection_close(
buf.data(), buf.size(), version, &ini_scid, &ini_dcid, error_code);
buf.data(), buf.size(), version, &ini_scid, &ini_dcid, error_code,
nullptr, 0);
if (nwrite < 0) {
LOG(ERROR) << "ngtcp2_crypto_write_connection_close failed";
return -1;