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
827abb57
Commit
827abb57
authored
Feb 24, 2016
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplified bitfield calculation of extension frame
parent
9aee43f7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
lib/nghttp2_option.c
lib/nghttp2_option.c
+2
-2
lib/nghttp2_session.c
lib/nghttp2_session.c
+1
-1
lib/nghttp2_session.h
lib/nghttp2_session.h
+5
-4
No files found.
lib/nghttp2_option.c
View file @
827abb57
...
@@ -70,6 +70,6 @@ void nghttp2_option_set_user_recv_extension_type(nghttp2_option *option,
...
@@ -70,6 +70,6 @@ void nghttp2_option_set_user_recv_extension_type(nghttp2_option *option,
}
}
option
->
opt_set_mask
|=
NGHTTP2_OPT_USER_RECV_EXT_TYPES
;
option
->
opt_set_mask
|=
NGHTTP2_OPT_USER_RECV_EXT_TYPES
;
option
->
user_recv_ext_types
[
type
/
8
]
=
(
uint8_t
)(
option
->
user_recv_ext_types
[
type
/
8
]
=
option
->
user_recv_ext_types
[
type
/
8
]
|
(
1
<<
(
7
-
(
type
&
0x7
)
)));
(
uint8_t
)(
option
->
user_recv_ext_types
[
type
/
8
]
|
(
1
<<
(
type
&
0x7
)));
}
}
lib/nghttp2_session.c
View file @
827abb57
...
@@ -5345,7 +5345,7 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session, const uint8_t *in,
...
@@ -5345,7 +5345,7 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session, const uint8_t *in,
if
(
!
session
->
callbacks
.
unpack_extension_callback
||
if
(
!
session
->
callbacks
.
unpack_extension_callback
||
(
session
->
user_recv_ext_types
[
iframe
->
frame
.
hd
.
type
/
8
]
&
(
session
->
user_recv_ext_types
[
iframe
->
frame
.
hd
.
type
/
8
]
&
(
1
<<
(
7
-
(
iframe
->
frame
.
hd
.
type
&
0x7
)
)))
==
0
)
{
(
1
<<
(
iframe
->
frame
.
hd
.
type
&
0x7
)))
==
0
)
{
/* Silently ignore unknown frame type. */
/* Silently ignore unknown frame type. */
busy
=
1
;
busy
=
1
;
...
...
lib/nghttp2_session.h
View file @
827abb57
...
@@ -306,10 +306,11 @@ struct nghttp2_session {
...
@@ -306,10 +306,11 @@ struct nghttp2_session {
WINDOW_UPDATE is not queued. */
WINDOW_UPDATE is not queued. */
uint8_t
window_update_queued
;
uint8_t
window_update_queued
;
/* Bitfield of extension frame types that application is willing to
/* Bitfield of extension frame types that application is willing to
receive. First most significant 10 bits are standard frame types
receive. To designate the bit of given frame type i, use
and not used. If bit is set, it indicates that incoming frame
user_recv_ext_types[i / 8] & (1 << (i & 0x7)). First 10 frame
with that type is passed to user defined callbacks, otherwise
types are standard frame types and not used in this bitfield. If
they are ignored. */
bit is set, it indicates that incoming frame with that type is
passed to user defined callbacks, otherwise they are ignored. */
uint8_t
user_recv_ext_types
[
32
];
uint8_t
user_recv_ext_types
[
32
];
};
};
...
...
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