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
d6ca95a0
Commit
d6ca95a0
authored
Jun 24, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix sibling's item is not queued when ancestor's item is detached
parent
285c74c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
1 deletion
+41
-1
lib/nghttp2_stream.c
lib/nghttp2_stream.c
+1
-1
tests/nghttp2_session_test.c
tests/nghttp2_session_test.c
+40
-0
No files found.
lib/nghttp2_stream.c
View file @
d6ca95a0
...
...
@@ -370,7 +370,7 @@ static int stream_update_dep_on_detach_item(nghttp2_stream *stream,
return
0
;
}
return
stream_update_dep_queue_top
(
stream
->
dep_next
,
session
);
return
stream_update_dep_queue_top
(
stream
,
session
);
}
int
nghttp2_stream_attach_item
(
nghttp2_stream
*
stream
,
...
...
tests/nghttp2_session_test.c
View file @
d6ca95a0
...
...
@@ -6429,6 +6429,46 @@ void test_nghttp2_session_stream_attach_item(void) {
CU_ASSERT
(
0
==
b
->
sum_norest_weight
);
nghttp2_session_del
(
session
);
nghttp2_session_server_new
(
&
session
,
&
callbacks
,
NULL
);
a
=
open_stream
(
session
,
1
);
b
=
open_stream_with_dep
(
session
,
3
,
a
);
c
=
open_stream_with_dep
(
session
,
5
,
a
);
d
=
open_stream_with_dep
(
session
,
7
,
c
);
/* a
* |
* c--b
* |
* d
*/
da
=
create_data_ob_item
(
mem
);
db
=
create_data_ob_item
(
mem
);
dc
=
create_data_ob_item
(
mem
);
nghttp2_stream_attach_item
(
a
,
da
,
session
);
nghttp2_stream_attach_item
(
b
,
db
,
session
);
nghttp2_stream_attach_item
(
c
,
dc
,
session
);
CU_ASSERT
(
NGHTTP2_STREAM_DPRI_TOP
==
a
->
dpri
);
CU_ASSERT
(
NGHTTP2_STREAM_DPRI_REST
==
b
->
dpri
);
CU_ASSERT
(
NGHTTP2_STREAM_DPRI_REST
==
c
->
dpri
);
CU_ASSERT
(
NGHTTP2_STREAM_DPRI_NO_ITEM
==
d
->
dpri
);
/* check that all children's item get queued */
nghttp2_stream_detach_item
(
a
,
session
);
CU_ASSERT
(
NGHTTP2_STREAM_DPRI_NO_ITEM
==
a
->
dpri
);
CU_ASSERT
(
NGHTTP2_STREAM_DPRI_TOP
==
b
->
dpri
);
CU_ASSERT
(
NGHTTP2_STREAM_DPRI_TOP
==
c
->
dpri
);
CU_ASSERT
(
NGHTTP2_STREAM_DPRI_NO_ITEM
==
d
->
dpri
);
CU_ASSERT
(
1
==
db
->
queued
);
CU_ASSERT
(
1
==
dc
->
queued
);
nghttp2_session_del
(
session
);
}
void
test_nghttp2_session_stream_attach_item_subtree
(
void
)
{
...
...
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