Compile with the latest ngtcp2

This commit is contained in:
Tatsuhiro Tsujikawa 2021-09-11 16:57:14 +09:00
parent 10c9d917ad
commit bc8f88f5fa
2 changed files with 15 additions and 4 deletions

View File

@ -108,9 +108,15 @@ int Client::quic_acked_stream_data_offset(int64_t stream_id, size_t datalen) {
}
namespace {
int stream_close(ngtcp2_conn *conn, int64_t stream_id, uint64_t app_error_code,
void *user_data, void *stream_user_data) {
int stream_close(ngtcp2_conn *conn, uint32_t flags, int64_t stream_id,
uint64_t app_error_code, void *user_data,
void *stream_user_data) {
auto c = static_cast<Client *>(user_data);
if (!(flags & NGTCP2_STREAM_CLOSE_FLAG_APP_ERROR_CODE_SET)) {
app_error_code = NGHTTP3_H3_NO_ERROR;
}
if (c->quic_stream_close(stream_id, app_error_code) != 0) {
return -1;
}

View File

@ -306,10 +306,15 @@ int Http3Upstream::recv_stream_data(uint32_t flags, int64_t stream_id,
}
namespace {
int stream_close(ngtcp2_conn *conn, int64_t stream_id, uint64_t app_error_code,
void *user_data, void *stream_user_data) {
int stream_close(ngtcp2_conn *conn, uint32_t flags, int64_t stream_id,
uint64_t app_error_code, void *user_data,
void *stream_user_data) {
auto upstream = static_cast<Http3Upstream *>(user_data);
if (!(flags & NGTCP2_STREAM_CLOSE_FLAG_APP_ERROR_CODE_SET)) {
app_error_code = NGHTTP3_H3_NO_ERROR;
}
if (upstream->stream_close(stream_id, app_error_code) != 0) {
return NGTCP2_ERR_CALLBACK_FAILURE;
}