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
d6db38a3
Commit
d6db38a3
authored
Jan 13, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Clean up integer configuration range checking
parent
c88a5291
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
17 deletions
+5
-17
src/shrpx_config.cc
src/shrpx_config.cc
+5
-17
No files found.
src/shrpx_config.cc
View file @
d6db38a3
...
...
@@ -1075,8 +1075,8 @@ int parse_config(const char *opt, const char *optarg) {
return
-
1
;
}
if
(
n
<
1
)
{
LOG
(
ERROR
)
<<
opt
<<
": specify
the integer more than or equal to 1
"
;
if
(
n
==
0
)
{
LOG
(
ERROR
)
<<
opt
<<
": specify
an integer strictly more than 0
"
;
return
-
1
;
}
...
...
@@ -1087,21 +1087,8 @@ int parse_config(const char *opt, const char *optarg) {
}
if
(
util
::
strieq
(
opt
,
SHRPX_OPT_BACKEND_HTTP1_CONNECTIONS_PER_FRONTEND
))
{
int
n
;
if
(
parse_uint
(
&
n
,
opt
,
optarg
)
!=
0
)
{
return
-
1
;
}
if
(
n
<
0
)
{
LOG
(
ERROR
)
<<
opt
<<
": specify the integer more than or equal to 0"
;
return
-
1
;
}
mod_config
()
->
downstream_connections_per_frontend
=
n
;
return
0
;
return
parse_uint
(
&
mod_config
()
->
downstream_connections_per_frontend
,
opt
,
optarg
);
}
if
(
util
::
strieq
(
opt
,
SHRPX_OPT_LISTENER_DISABLE_TIMEOUT
))
{
...
...
@@ -1139,6 +1126,7 @@ int parse_config(const char *opt, const char *optarg) {
if
(
n
==
0
)
{
LOG
(
ERROR
)
<<
opt
<<
": specify an integer strictly more than 0"
;
return
-
1
;
}
...
...
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