From d14d97ab682dfce91aa1ce6431fb15a925c46772 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Tue, 9 Nov 2021 11:13:23 +0900 Subject: [PATCH] Rename send_stop_sending to stop_sending --- src/h2load_http3_session.cc | 12 +++++------- src/h2load_http3_session.h | 2 +- src/shrpx_http3_upstream.cc | 14 +++++++------- src/shrpx_http3_upstream.h | 2 +- 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/src/h2load_http3_session.cc b/src/h2load_http3_session.cc index 40970f7a..a62bb70c 100644 --- a/src/h2load_http3_session.cc +++ b/src/h2load_http3_session.cc @@ -213,19 +213,17 @@ void Http3Session::recv_header(int64_t stream_id, const nghttp3_vec *name, } namespace { -int send_stop_sending(nghttp3_conn *conn, int64_t stream_id, - uint64_t app_error_code, void *user_data, - void *stream_user_data) { +int stop_sending(nghttp3_conn *conn, int64_t stream_id, uint64_t app_error_code, + void *user_data, void *stream_user_data) { auto s = static_cast(user_data); - if (s->send_stop_sending(stream_id, app_error_code) != 0) { + if (s->stop_sending(stream_id, app_error_code) != 0) { return NGHTTP3_ERR_CALLBACK_FAILURE; } return 0; } } // namespace -int Http3Session::send_stop_sending(int64_t stream_id, - uint64_t app_error_code) { +int Http3Session::stop_sending(int64_t stream_id, uint64_t app_error_code) { auto rv = ngtcp2_conn_shutdown_stream_read(client_->quic.conn, stream_id, app_error_code); if (rv != 0) { @@ -300,7 +298,7 @@ int Http3Session::init_conn() { nullptr, // begin_trailers h2load::recv_header, nullptr, // end_trailers - h2load::send_stop_sending, + h2load::stop_sending, }; auto config = client_->worker->config; diff --git a/src/h2load_http3_session.h b/src/h2load_http3_session.h index 27ff025b..cdd194dd 100644 --- a/src/h2load_http3_session.h +++ b/src/h2load_http3_session.h @@ -51,7 +51,7 @@ public: void begin_headers(int64_t stream_id); void recv_header(int64_t stream_id, const nghttp3_vec *name, const nghttp3_vec *value); - int send_stop_sending(int64_t stream_id, uint64_t app_error_code); + int stop_sending(int64_t stream_id, uint64_t app_error_code); int close_stream(int64_t stream_id, uint64_t app_error_code); int shutdown_stream_read(int64_t stream_id); diff --git a/src/shrpx_http3_upstream.cc b/src/shrpx_http3_upstream.cc index 97099909..87f219db 100644 --- a/src/shrpx_http3_upstream.cc +++ b/src/shrpx_http3_upstream.cc @@ -2353,12 +2353,12 @@ int Http3Upstream::http_stream_close(Downstream *downstream, } namespace { -int http_send_stop_sending(nghttp3_conn *conn, int64_t stream_id, - uint64_t app_error_code, void *user_data, - void *stream_user_data) { +int http_stop_sending(nghttp3_conn *conn, int64_t stream_id, + uint64_t app_error_code, void *user_data, + void *stream_user_data) { auto upstream = static_cast(user_data); - if (upstream->http_send_stop_sending(stream_id, app_error_code) != 0) { + if (upstream->http_stop_sending(stream_id, app_error_code) != 0) { return NGHTTP3_ERR_CALLBACK_FAILURE; } @@ -2366,8 +2366,8 @@ int http_send_stop_sending(nghttp3_conn *conn, int64_t stream_id, } } // namespace -int Http3Upstream::http_send_stop_sending(int64_t stream_id, - uint64_t app_error_code) { +int Http3Upstream::http_stop_sending(int64_t stream_id, + uint64_t app_error_code) { auto rv = ngtcp2_conn_shutdown_stream_read(conn_, stream_id, app_error_code); if (ngtcp2_err_is_fatal(rv)) { ULOG(ERROR, this) << "ngtcp2_conn_shutdown_stream_read: " @@ -2422,7 +2422,7 @@ int Http3Upstream::setup_httpconn() { nullptr, // begin_trailers nullptr, // recv_trailer nullptr, // end_trailers - shrpx::http_send_stop_sending, + shrpx::http_stop_sending, shrpx::http_end_stream, shrpx::http_reset_stream, }; diff --git a/src/shrpx_http3_upstream.h b/src/shrpx_http3_upstream.h index 8df63ea0..0e29356e 100644 --- a/src/shrpx_http3_upstream.h +++ b/src/shrpx_http3_upstream.h @@ -141,7 +141,7 @@ public: int http_acked_stream_data(Downstream *downstream, uint64_t datalen); int http_shutdown_stream_read(int64_t stream_id); int http_reset_stream(int64_t stream_id, uint64_t app_error_code); - int http_send_stop_sending(int64_t stream_id, uint64_t app_error_code); + int http_stop_sending(int64_t stream_id, uint64_t app_error_code); int http_recv_data(Downstream *downstream, const uint8_t *data, size_t datalen); int handshake_completed();