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
2b9d4efa
Commit
2b9d4efa
authored
Oct 04, 2013
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor predicate_*_send functions
parent
252c77f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
20 deletions
+19
-20
lib/nghttp2_session.c
lib/nghttp2_session.c
+19
-20
No files found.
lib/nghttp2_session.c
View file @
2b9d4efa
...
...
@@ -623,9 +623,8 @@ int nghttp2_session_close_stream_if_shut_rdwr(nghttp2_session *session,
if
((
stream
->
shut_flags
&
NGHTTP2_SHUT_RDWR
)
==
NGHTTP2_SHUT_RDWR
)
{
return
nghttp2_session_close_stream
(
session
,
stream
->
stream_id
,
NGHTTP2_NO_ERROR
);
}
else
{
return
0
;
}
return
0
;
}
/*
...
...
@@ -642,11 +641,11 @@ static int nghttp2_predicate_stream_for_send(nghttp2_stream *stream)
{
if
(
stream
==
NULL
)
{
return
NGHTTP2_ERR_STREAM_CLOSED
;
}
else
if
(
stream
->
shut_flags
&
NGHTTP2_SHUT_WR
)
{
}
if
(
stream
->
shut_flags
&
NGHTTP2_SHUT_WR
)
{
return
NGHTTP2_ERR_STREAM_SHUT_WR
;
}
else
{
return
0
;
}
return
0
;
}
/*
...
...
@@ -708,13 +707,14 @@ static int nghttp2_session_predicate_response_headers_send
}
if
(
nghttp2_session_is_my_stream_id
(
session
,
stream_id
))
{
return
NGHTTP2_ERR_INVALID_STREAM_ID
;
}
else
if
(
stream
->
state
==
NGHTTP2_STREAM_OPENING
)
{
}
if
(
stream
->
state
==
NGHTTP2_STREAM_OPENING
)
{
return
0
;
}
else
if
(
stream
->
state
==
NGHTTP2_STREAM_CLOSING
)
{
}
if
(
stream
->
state
==
NGHTTP2_STREAM_CLOSING
)
{
return
NGHTTP2_ERR_STREAM_CLOSING
;
}
else
{
return
NGHTTP2_ERR_INVALID_STREAM_STATE
;
}
return
NGHTTP2_ERR_INVALID_STREAM_STATE
;
}
/*
...
...
@@ -781,18 +781,18 @@ static int nghttp2_session_predicate_stream_frame_send
return
r
;
}
if
(
nghttp2_session_is_my_stream_id
(
session
,
stream_id
))
{
if
(
stream
->
state
!=
NGHTTP2_STREAM_CLOSING
)
{
return
0
;
}
else
{
if
(
stream
->
state
==
NGHTTP2_STREAM_CLOSING
)
{
return
NGHTTP2_ERR_STREAM_CLOSING
;
}
}
else
if
(
stream
->
state
==
NGHTTP2_STREAM_OPENED
)
{
return
0
;
}
else
if
(
stream
->
state
==
NGHTTP2_STREAM_CLOSING
)
{
}
if
(
stream
->
state
==
NGHTTP2_STREAM_OPENED
)
{
return
0
;
}
if
(
stream
->
state
==
NGHTTP2_STREAM_CLOSING
)
{
return
NGHTTP2_ERR_STREAM_CLOSING
;
}
else
{
return
NGHTTP2_ERR_INVALID_STREAM_STATE
;
}
return
NGHTTP2_ERR_INVALID_STREAM_STATE
;
}
/*
...
...
@@ -818,12 +818,11 @@ static int nghttp2_session_predicate_priority_send
if
(
stream
==
NULL
)
{
return
NGHTTP2_ERR_STREAM_CLOSED
;
}
/* Sending PRIORITY to reserved state is OK */
if
(
stream
->
state
!=
NGHTTP2_STREAM_CLOSING
)
{
return
0
;
}
else
{
if
(
stream
->
state
==
NGHTTP2_STREAM_CLOSING
)
{
return
NGHTTP2_ERR_STREAM_CLOSING
;
}
/* Sending PRIORITY to reserved state is OK */
return
0
;
}
/*
...
...
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