Remove duplicated dependency validation in nghttp2_session_reprioritize_stream

This commit is contained in:
Tatsuhiro Tsujikawa 2015-06-21 16:31:30 +09:00
parent a7031da364
commit 2224b98c9c
2 changed files with 4 additions and 6 deletions

View File

@ -601,15 +601,12 @@ nghttp2_session_reprioritize_stream(nghttp2_session *session,
nghttp2_priority_spec pri_spec_default;
const nghttp2_priority_spec *pri_spec = pri_spec_in;
assert(pri_spec->stream_id != stream->stream_id);
if (!nghttp2_stream_in_dep_tree(stream)) {
return 0;
}
if (pri_spec->stream_id == stream->stream_id) {
return nghttp2_session_terminate_session_with_reason(
session, NGHTTP2_PROTOCOL_ERROR, "depend on itself");
}
if (pri_spec->stream_id != 0) {
dep_stream = nghttp2_session_get_stream_raw(session, pri_spec->stream_id);

View File

@ -731,7 +731,8 @@ int nghttp2_session_update_local_settings(nghttp2_session *session,
/*
* Re-prioritize |stream|. The new priority specification is
* |pri_spec|.
* |pri_spec|. Caller must ensure that stream->hd.stream_id !=
* pri_spec->stream_id.
*
* This function returns 0 if it succeeds, or one of the following
* negative error codes: