From be0d0e29956baed4384ddfac303c1e00de92f7cb Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Fri, 30 Oct 2015 22:48:27 +0900 Subject: [PATCH] Rename nghttp2_session_request_allowed as nghttp2_session_check_request_allowed --- doc/Makefile.am | 2 +- lib/includes/nghttp2/nghttp2.h | 3 ++- lib/nghttp2_session.c | 2 +- src/h2load_http2_session.cc | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index 07ebb3c8..d3055c38 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -105,7 +105,7 @@ APIDOCS= \ nghttp2_session_mem_recv.rst \ nghttp2_session_mem_send.rst \ nghttp2_session_recv.rst \ - nghttp2_session_request_allowed.rst \ + nghttp2_session_check_request_allowed.rst \ nghttp2_session_resume_data.rst \ nghttp2_session_send.rst \ nghttp2_session_server_new.rst \ diff --git a/lib/includes/nghttp2/nghttp2.h b/lib/includes/nghttp2/nghttp2.h index 09fa5d04..9aecc1dc 100644 --- a/lib/includes/nghttp2/nghttp2.h +++ b/lib/includes/nghttp2/nghttp2.h @@ -3494,7 +3494,8 @@ NGHTTP2_EXTERN int32_t * may return error. Or, request is failed to sent, and * :type:`nghttp2_on_stream_close_callback` is called. */ -NGHTTP2_EXTERN int nghttp2_session_request_allowed(nghttp2_session *session); +NGHTTP2_EXTERN int +nghttp2_session_check_request_allowed(nghttp2_session *session); /** * @function diff --git a/lib/nghttp2_session.c b/lib/nghttp2_session.c index bb103502..4b5e6a22 100644 --- a/lib/nghttp2_session.c +++ b/lib/nghttp2_session.c @@ -1322,7 +1322,7 @@ static int session_predicate_for_stream_send(nghttp2_session *session, return 0; } -int nghttp2_session_request_allowed(nghttp2_session *session) { +int nghttp2_session_check_request_allowed(nghttp2_session *session) { return !session->server && session->next_stream_id <= INT32_MAX && (session->goaway_flags & (NGHTTP2_GOAWAY_TERM_ON_SEND | NGHTTP2_GOAWAY_RECV)) == 0; diff --git a/src/h2load_http2_session.cc b/src/h2load_http2_session.cc index 43d2ac6b..00ff92fe 100644 --- a/src/h2load_http2_session.cc +++ b/src/h2load_http2_session.cc @@ -210,7 +210,7 @@ void Http2Session::on_connect() { } int Http2Session::submit_request(RequestStat *req_stat) { - if (nghttp2_session_request_allowed(session_) == 0) { + if (nghttp2_session_check_request_allowed(session_) == 0) { return -1; }