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
c5d7d570
Commit
c5d7d570
authored
Sep 13, 2013
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Code cleanup
parent
c48a1d75
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
src/shrpx_config.cc
src/shrpx_config.cc
+11
-11
No files found.
src/shrpx_config.cc
View file @
c5d7d570
...
...
@@ -138,7 +138,7 @@ int split_host_port(char *host, size_t hostlen, uint16_t *port_ptr,
host
[
len
]
=
'\0'
;
errno
=
0
;
unsigned
long
d
=
strtoul
(
p
+
1
,
0
,
10
);
unsigned
long
d
=
strtoul
(
p
+
1
,
nullptr
,
10
);
if
(
errno
==
0
&&
1
<=
d
&&
d
<=
std
::
numeric_limits
<
uint16_t
>::
max
())
{
*
port_ptr
=
d
;
return
0
;
...
...
@@ -213,9 +213,9 @@ int parse_config(const char *opt, const char *optarg)
mod_config
()
->
port
=
port
;
}
}
else
if
(
util
::
strieq
(
opt
,
SHRPX_OPT_WORKERS
))
{
mod_config
()
->
num_worker
=
strtol
(
optarg
,
0
,
10
);
mod_config
()
->
num_worker
=
strtol
(
optarg
,
nullptr
,
10
);
}
else
if
(
util
::
strieq
(
opt
,
SHRPX_OPT_SPDY_MAX_CONCURRENT_STREAMS
))
{
mod_config
()
->
spdy_max_concurrent_streams
=
strtol
(
optarg
,
0
,
10
);
mod_config
()
->
spdy_max_concurrent_streams
=
strtol
(
optarg
,
nullptr
,
10
);
}
else
if
(
util
::
strieq
(
opt
,
SHRPX_OPT_LOG_LEVEL
))
{
if
(
Log
::
set_severity_level_by_name
(
optarg
)
==
-
1
)
{
LOG
(
ERROR
)
<<
"Invalid severity level: "
<<
optarg
;
...
...
@@ -234,24 +234,24 @@ int parse_config(const char *opt, const char *optarg)
}
else
if
(
util
::
strieq
(
opt
,
SHRPX_OPT_NO_VIA
))
{
mod_config
()
->
no_via
=
util
::
strieq
(
optarg
,
"yes"
);
}
else
if
(
util
::
strieq
(
opt
,
SHRPX_OPT_FRONTEND_SPDY_READ_TIMEOUT
))
{
timeval
tv
=
{
strtol
(
optarg
,
0
,
10
),
0
};
timeval
tv
=
{
strtol
(
optarg
,
nullptr
,
10
),
0
};
mod_config
()
->
spdy_upstream_read_timeout
=
tv
;
}
else
if
(
util
::
strieq
(
opt
,
SHRPX_OPT_FRONTEND_READ_TIMEOUT
))
{
timeval
tv
=
{
strtol
(
optarg
,
0
,
10
),
0
};
timeval
tv
=
{
strtol
(
optarg
,
nullptr
,
10
),
0
};
mod_config
()
->
upstream_read_timeout
=
tv
;
}
else
if
(
util
::
strieq
(
opt
,
SHRPX_OPT_FRONTEND_WRITE_TIMEOUT
))
{
timeval
tv
=
{
strtol
(
optarg
,
0
,
10
),
0
};
timeval
tv
=
{
strtol
(
optarg
,
nullptr
,
10
),
0
};
mod_config
()
->
upstream_write_timeout
=
tv
;
}
else
if
(
util
::
strieq
(
opt
,
SHRPX_OPT_BACKEND_READ_TIMEOUT
))
{
timeval
tv
=
{
strtol
(
optarg
,
0
,
10
),
0
};
timeval
tv
=
{
strtol
(
optarg
,
nullptr
,
10
),
0
};
mod_config
()
->
downstream_read_timeout
=
tv
;
}
else
if
(
util
::
strieq
(
opt
,
SHRPX_OPT_BACKEND_WRITE_TIMEOUT
))
{
timeval
tv
=
{
strtol
(
optarg
,
0
,
10
),
0
};
timeval
tv
=
{
strtol
(
optarg
,
nullptr
,
10
),
0
};
mod_config
()
->
downstream_write_timeout
=
tv
;
}
else
if
(
util
::
strieq
(
opt
,
SHRPX_OPT_ACCESSLOG
))
{
mod_config
()
->
accesslog
=
util
::
strieq
(
optarg
,
"yes"
);
}
else
if
(
util
::
strieq
(
opt
,
SHRPX_OPT_BACKEND_KEEP_ALIVE_TIMEOUT
))
{
timeval
tv
=
{
strtol
(
optarg
,
0
,
10
),
0
};
timeval
tv
=
{
strtol
(
optarg
,
nullptr
,
10
),
0
};
mod_config
()
->
downstream_idle_read_timeout
=
tv
;
}
else
if
(
util
::
strieq
(
opt
,
SHRPX_OPT_FRONTEND_SPDY_WINDOW_BITS
)
||
util
::
strieq
(
opt
,
SHRPX_OPT_BACKEND_SPDY_WINDOW_BITS
))
{
...
...
@@ -265,7 +265,7 @@ int parse_config(const char *opt, const char *optarg)
optname
=
SHRPX_OPT_BACKEND_SPDY_WINDOW_BITS
;
}
errno
=
0
;
unsigned
long
int
n
=
strtoul
(
optarg
,
0
,
10
);
unsigned
long
int
n
=
strtoul
(
optarg
,
nullptr
,
10
);
if
(
errno
==
0
&&
n
<
31
)
{
*
resp
=
n
;
}
else
{
...
...
@@ -328,7 +328,7 @@ int parse_config(const char *opt, const char *optarg)
}
mod_config
()
->
syslog_facility
=
facility
;
}
else
if
(
util
::
strieq
(
opt
,
SHRPX_OPT_BACKLOG
))
{
mod_config
()
->
backlog
=
strtol
(
optarg
,
0
,
10
);
mod_config
()
->
backlog
=
strtol
(
optarg
,
nullptr
,
10
);
}
else
if
(
util
::
strieq
(
opt
,
SHRPX_OPT_CIPHERS
))
{
set_config_str
(
&
mod_config
()
->
ciphers
,
optarg
);
}
else
if
(
util
::
strieq
(
opt
,
SHRPX_OPT_HONOR_CIPHER_ORDER
))
{
...
...
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