nghttp2_session_on_window_update_received: Split into 2 functions
This commit is contained in:
parent
464f141593
commit
87abc8b951
|
@ -2394,11 +2394,10 @@ static int nghttp2_session_push_back_deferred_data(nghttp2_session *session)
|
||||||
nghttp2_push_back_deferred_data_func, session);
|
nghttp2_push_back_deferred_data_func, session);
|
||||||
}
|
}
|
||||||
|
|
||||||
int nghttp2_session_on_window_update_received(nghttp2_session *session,
|
static int session_on_connection_window_update_received
|
||||||
nghttp2_frame *frame)
|
(nghttp2_session *session, nghttp2_frame *frame)
|
||||||
{
|
{
|
||||||
int rv;
|
int rv;
|
||||||
if(frame->hd.stream_id == 0) {
|
|
||||||
/* Handle connection-level flow control */
|
/* Handle connection-level flow control */
|
||||||
if(session->remote_flow_control == 0) {
|
if(session->remote_flow_control == 0) {
|
||||||
/* Disabling flow control by sending SETTINGS and receiving
|
/* Disabling flow control by sending SETTINGS and receiving
|
||||||
|
@ -2424,7 +2423,12 @@ int nghttp2_session_on_window_update_received(nghttp2_session *session,
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
|
||||||
|
static int session_on_stream_window_update_received
|
||||||
|
(nghttp2_session *session, nghttp2_frame *frame)
|
||||||
|
{
|
||||||
|
int rv;
|
||||||
nghttp2_stream *stream;
|
nghttp2_stream *stream;
|
||||||
stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
|
stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
|
||||||
if(!stream) {
|
if(!stream) {
|
||||||
|
@ -2458,6 +2462,15 @@ int nghttp2_session_on_window_update_received(nghttp2_session *session,
|
||||||
nghttp2_stream_detach_deferred_data(stream);
|
nghttp2_stream_detach_deferred_data(stream);
|
||||||
}
|
}
|
||||||
return nghttp2_session_call_on_frame_received(session, frame);
|
return nghttp2_session_call_on_frame_received(session, frame);
|
||||||
|
}
|
||||||
|
|
||||||
|
int nghttp2_session_on_window_update_received(nghttp2_session *session,
|
||||||
|
nghttp2_frame *frame)
|
||||||
|
{
|
||||||
|
if(frame->hd.stream_id == 0) {
|
||||||
|
return session_on_connection_window_update_received(session, frame);
|
||||||
|
} else {
|
||||||
|
return session_on_stream_window_update_received(session, frame);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue