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
364772f5
Commit
364772f5
authored
Feb 11, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src: Fix error reported by coverity scan
parent
ae0100a9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
6 deletions
+13
-6
src/h2load_http2_session.cc
src/h2load_http2_session.cc
+4
-0
src/nghttp.cc
src/nghttp.cc
+1
-0
src/shrpx_connection.cc
src/shrpx_connection.cc
+8
-6
No files found.
src/h2load_http2_session.cc
View file @
364772f5
...
...
@@ -83,6 +83,9 @@ int on_stream_close_callback(nghttp2_session *session, int32_t stream_id,
auto
client
=
static_cast
<
Client
*>
(
user_data
);
auto
req_stat
=
static_cast
<
RequestStat
*>
(
nghttp2_session_get_stream_user_data
(
session
,
stream_id
));
if
(
!
req_stat
)
{
return
0
;
}
client
->
on_stream_close
(
stream_id
,
error_code
==
NGHTTP2_NO_ERROR
,
req_stat
);
return
0
;
}
...
...
@@ -100,6 +103,7 @@ int before_frame_send_callback(nghttp2_session *session,
client
->
on_request
(
frame
->
hd
.
stream_id
);
auto
req_stat
=
static_cast
<
RequestStat
*>
(
nghttp2_session_get_stream_user_data
(
session
,
frame
->
hd
.
stream_id
));
assert
(
req_stat
);
client
->
record_request_time
(
req_stat
);
return
0
;
...
...
src/nghttp.cc
View file @
364772f5
...
...
@@ -1825,6 +1825,7 @@ int before_frame_send_callback(nghttp2_session *session,
}
auto
req
=
static_cast
<
Request
*>
(
nghttp2_session_get_stream_user_data
(
session
,
frame
->
hd
.
stream_id
));
assert
(
req
);
req
->
record_request_time
();
return
0
;
}
...
...
src/shrpx_connection.cc
View file @
364772f5
...
...
@@ -253,12 +253,13 @@ ssize_t Connection::read_tls(void *data, size_t len) {
}
ssize_t
Connection
::
write_clear
(
const
void
*
data
,
size_t
len
)
{
ssize_t
nwrite
=
std
::
min
(
len
,
wlimit
.
avail
());
if
(
nwrite
==
0
)
{
len
=
std
::
min
(
len
,
wlimit
.
avail
());
if
(
len
==
0
)
{
return
0
;
}
while
((
nwrite
=
write
(
fd
,
data
,
nwrite
))
==
-
1
&&
errno
==
EINTR
)
ssize_t
nwrite
;
while
((
nwrite
=
write
(
fd
,
data
,
len
))
==
-
1
&&
errno
==
EINTR
)
;
if
(
nwrite
==
-
1
)
{
if
(
errno
==
EAGAIN
||
errno
==
EWOULDBLOCK
)
{
...
...
@@ -298,12 +299,13 @@ ssize_t Connection::writev_clear(struct iovec *iov, int iovcnt) {
}
ssize_t
Connection
::
read_clear
(
void
*
data
,
size_t
len
)
{
ssize_t
nread
=
std
::
min
(
len
,
rlimit
.
avail
());
if
(
nread
==
0
)
{
len
=
std
::
min
(
len
,
rlimit
.
avail
());
if
(
len
==
0
)
{
return
0
;
}
while
((
nread
=
read
(
fd
,
data
,
nread
))
==
-
1
&&
errno
==
EINTR
)
ssize_t
nread
;
while
((
nread
=
read
(
fd
,
data
,
len
))
==
-
1
&&
errno
==
EINTR
)
;
if
(
nread
==
-
1
)
{
if
(
errno
==
EAGAIN
||
errno
==
EWOULDBLOCK
)
{
...
...
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