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
466e4b7a
Commit
466e4b7a
authored
Feb 14, 2016
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Use ImmutableString for conf_path
parent
76a42522
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
src/shrpx.cc
src/shrpx.cc
+6
-6
src/shrpx_config.h
src/shrpx_config.h
+1
-1
No files found.
src/shrpx.cc
View file @
466e4b7a
...
...
@@ -1040,7 +1040,7 @@ void fill_default_config() {
*
mod_config
()
=
{};
mod_config
()
->
num_worker
=
1
;
mod_config
()
->
conf_path
=
strcopy
(
"/etc/nghttpx/nghttpx.conf"
)
;
mod_config
()
->
conf_path
=
"/etc/nghttpx/nghttpx.conf"
;
mod_config
()
->
pid
=
getpid
();
auto
&
tlsconf
=
mod_config
()
->
tls
;
...
...
@@ -1893,7 +1893,7 @@ Scripting:
Misc:
--conf=<PATH>
Load configuration from <PATH>.
Default: )"
<<
get_config
()
->
conf_path
.
get
()
<<
R"(
Default: )"
<<
get_config
()
->
conf_path
<<
R"(
--include=<PATH>
Load additional configurations from <PATH>. File <PATH>
is read when configuration parser encountered this
...
...
@@ -1919,11 +1919,11 @@ namespace {
void
process_options
(
int
argc
,
char
**
argv
,
std
::
vector
<
std
::
pair
<
const
char
*
,
const
char
*>>
&
cmdcfgs
)
{
if
(
conf_exists
(
get_config
()
->
conf_path
.
get
()))
{
if
(
conf_exists
(
get_config
()
->
conf_path
.
c_str
()))
{
std
::
set
<
std
::
string
>
include_set
;
if
(
load_config
(
get_config
()
->
conf_path
.
get
(),
include_set
)
==
-
1
)
{
if
(
load_config
(
get_config
()
->
conf_path
.
c_str
(),
include_set
)
==
-
1
)
{
LOG
(
FATAL
)
<<
"Failed to load configuration from "
<<
get_config
()
->
conf_path
.
get
()
;
<<
get_config
()
->
conf_path
;
exit
(
EXIT_FAILURE
);
}
assert
(
include_set
.
empty
());
...
...
@@ -2563,7 +2563,7 @@ int main(int argc, char **argv) {
break
;
case
12
:
// --conf
mod_config
()
->
conf_path
=
strcopy
(
optarg
)
;
mod_config
()
->
conf_path
=
optarg
;
break
;
case
14
:
// --syslog-facility
...
...
src/shrpx_config.h
View file @
466e4b7a
...
...
@@ -582,7 +582,7 @@ struct Config {
LoggingConfig
logging
;
ConnectionConfig
conn
;
ImmutableString
pid_file
;
std
::
unique_ptr
<
char
[]
>
conf_path
;
ImmutableString
conf_path
;
std
::
unique_ptr
<
char
[]
>
user
;
std
::
unique_ptr
<
char
[]
>
mruby_file
;
char
**
original_argv
;
...
...
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