Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
4aab1599
Commit
4aab1599
authored
Jan 04, 2017
by
Tatsuhiro Tsujikawa
Committed by
GitHub
Jan 04, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #769 from alagoutte/pvs
Fix issue reporting by PVS Studio
parents
44198267
8256c6e0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
14 deletions
+7
-14
examples/libevent-client.c
examples/libevent-client.c
+1
-1
lib/nghttp2_hd.c
lib/nghttp2_hd.c
+2
-6
lib/nghttp2_submit.c
lib/nghttp2_submit.c
+4
-7
No files found.
examples/libevent-client.c
View file @
4aab1599
...
...
@@ -287,7 +287,7 @@ static int on_stream_close_callback(nghttp2_session *session, int32_t stream_id,
int
rv
;
if
(
session_data
->
stream_data
->
stream_id
==
stream_id
)
{
fprintf
(
stderr
,
"Stream %d closed with error_code=%
d
\n
"
,
stream_id
,
fprintf
(
stderr
,
"Stream %d closed with error_code=%
u
\n
"
,
stream_id
,
error_code
);
rv
=
nghttp2_session_terminate_session
(
session
,
NGHTTP2_NO_ERROR
);
if
(
rv
!=
0
)
{
...
...
lib/nghttp2_hd.c
View file @
4aab1599
...
...
@@ -2281,10 +2281,6 @@ ssize_t nghttp2_hd_decode_length(uint32_t *res, size_t *shift_ptr, int *fin,
return
decode_length
(
res
,
shift_ptr
,
fin
,
initial
,
shift
,
in
,
last
,
prefix
);
}
static
size_t
hd_get_num_table_entries
(
nghttp2_hd_context
*
context
)
{
return
context
->
hd_table
.
len
+
NGHTTP2_STATIC_TABLE_LENGTH
;
}
static
const
nghttp2_nv
*
hd_get_table_entry
(
nghttp2_hd_context
*
context
,
size_t
idx
)
{
if
(
idx
==
0
)
{
...
...
@@ -2301,7 +2297,7 @@ static const nghttp2_nv *hd_get_table_entry(nghttp2_hd_context *context,
}
size_t
nghttp2_hd_deflate_get_num_table_entries
(
nghttp2_hd_deflater
*
deflater
)
{
return
hd_get_num_table_entries
(
&
deflater
->
ctx
);
return
get_max_index
(
&
deflater
->
ctx
);
}
const
nghttp2_nv
*
...
...
@@ -2320,7 +2316,7 @@ nghttp2_hd_deflate_get_max_dynamic_table_size(nghttp2_hd_deflater *deflater) {
}
size_t
nghttp2_hd_inflate_get_num_table_entries
(
nghttp2_hd_inflater
*
inflater
)
{
return
hd_get_num_table_entries
(
&
inflater
->
ctx
);
return
get_max_index
(
&
inflater
->
ctx
);
}
const
nghttp2_nv
*
...
...
lib/nghttp2_submit.c
View file @
4aab1599
...
...
@@ -365,7 +365,7 @@ int32_t nghttp2_submit_push_promise(nghttp2_session *session, uint8_t flags _U_,
return
promised_stream_id
;
}
int
nghttp2_submit_window_update
(
nghttp2_session
*
session
,
uint8_t
flags
,
int
nghttp2_submit_window_update
(
nghttp2_session
*
session
,
uint8_t
flags
_U_
,
int32_t
stream_id
,
int32_t
window_size_increment
)
{
int
rv
;
...
...
@@ -373,7 +373,6 @@ int nghttp2_submit_window_update(nghttp2_session *session, uint8_t flags,
if
(
window_size_increment
==
0
)
{
return
0
;
}
flags
=
0
;
if
(
stream_id
==
0
)
{
rv
=
nghttp2_adjust_local_window_size
(
&
session
->
local_window_size
,
&
session
->
recv_window_size
,
...
...
@@ -404,14 +403,14 @@ int nghttp2_submit_window_update(nghttp2_session *session, uint8_t flags,
nghttp2_max
(
0
,
stream
->
consumed_size
-
window_size_increment
);
}
return
nghttp2_session_add_window_update
(
session
,
flags
,
stream_id
,
return
nghttp2_session_add_window_update
(
session
,
0
,
stream_id
,
window_size_increment
);
}
return
0
;
}
int
nghttp2_session_set_local_window_size
(
nghttp2_session
*
session
,
uint8_t
flags
,
int32_t
stream_id
,
uint8_t
flags
_U_
,
int32_t
stream_id
,
int32_t
window_size
)
{
int32_t
window_size_increment
;
nghttp2_stream
*
stream
;
...
...
@@ -421,8 +420,6 @@ int nghttp2_session_set_local_window_size(nghttp2_session *session,
return
NGHTTP2_ERR_INVALID_ARGUMENT
;
}
flags
=
0
;
if
(
stream_id
==
0
)
{
window_size_increment
=
window_size
-
session
->
local_window_size
;
...
...
@@ -472,7 +469,7 @@ int nghttp2_session_set_local_window_size(nghttp2_session *session,
}
if
(
window_size_increment
>
0
)
{
return
nghttp2_session_add_window_update
(
session
,
flags
,
stream_id
,
return
nghttp2_session_add_window_update
(
session
,
0
,
stream_id
,
window_size_increment
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment