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
7a219053
Commit
7a219053
authored
Nov 22, 2012
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shrpx: Remove Config ctor and fill all initial values in fill_default_config()
parent
c1332a35
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
46 deletions
+10
-46
src/shrpx.cc
src/shrpx.cc
+10
-9
src/shrpx_config.cc
src/shrpx_config.cc
+0
-36
src/shrpx_config.h
src/shrpx_config.h
+0
-1
No files found.
src/shrpx.cc
View file @
7a219053
...
@@ -296,7 +296,11 @@ bool conf_exists(const char *path)
...
@@ -296,7 +296,11 @@ bool conf_exists(const char *path)
namespace
{
namespace
{
void
fill_default_config
()
void
fill_default_config
()
{
{
memset
(
mod_config
(),
0
,
sizeof
(
*
mod_config
()));
mod_config
()
->
verbose
=
false
;
mod_config
()
->
daemon
=
false
;
mod_config
()
->
daemon
=
false
;
mod_config
()
->
verify_client
=
false
;
mod_config
()
->
server_name
=
"shrpx spdylay/"
SPDYLAY_VERSION
;
mod_config
()
->
server_name
=
"shrpx spdylay/"
SPDYLAY_VERSION
;
set_config_str
(
&
mod_config
()
->
host
,
"0.0.0.0"
);
set_config_str
(
&
mod_config
()
->
host
,
"0.0.0.0"
);
...
@@ -332,33 +336,30 @@ void fill_default_config()
...
@@ -332,33 +336,30 @@ void fill_default_config()
set_config_str
(
&
mod_config
()
->
downstream_host
,
"127.0.0.1"
);
set_config_str
(
&
mod_config
()
->
downstream_host
,
"127.0.0.1"
);
mod_config
()
->
downstream_port
=
80
;
mod_config
()
->
downstream_port
=
80
;
mod_config
()
->
downstream_hostport
=
0
;
mod_config
()
->
downstream_addrlen
=
0
;
mod_config
()
->
num_worker
=
1
;
mod_config
()
->
num_worker
=
1
;
mod_config
()
->
spdy_max_concurrent_streams
=
mod_config
()
->
spdy_max_concurrent_streams
=
SPDYLAY_INITIAL_MAX_CONCURRENT_STREAMS
;
SPDYLAY_INITIAL_MAX_CONCURRENT_STREAMS
;
mod_config
()
->
spdy_proxy
=
false
;
mod_config
()
->
add_x_forwarded_for
=
false
;
mod_config
()
->
add_x_forwarded_for
=
false
;
mod_config
()
->
accesslog
=
false
;
mod_config
()
->
accesslog
=
false
;
set_config_str
(
&
mod_config
()
->
conf_path
,
"/etc/shrpx/shrpx.conf"
);
set_config_str
(
&
mod_config
()
->
conf_path
,
"/etc/shrpx/shrpx.conf"
);
mod_config
()
->
syslog
=
false
;
mod_config
()
->
syslog
=
false
;
mod_config
()
->
syslog_facility
=
LOG_DAEMON
;
mod_config
()
->
syslog_facility
=
LOG_DAEMON
;
mod_config
()
->
use_syslog
=
false
;
mod_config
()
->
use_syslog
=
false
;
// Default accept() backlog
// Default accept() backlog
mod_config
()
->
backlog
=
256
;
mod_config
()
->
backlog
=
256
;
mod_config
()
->
ciphers
=
0
;
mod_config
()
->
ciphers
=
0
;
mod_config
()
->
spdy_proxy
=
false
;
mod_config
()
->
client_proxy
=
false
;
mod_config
()
->
client_proxy
=
false
;
mod_config
()
->
client
=
false
;
mod_config
()
->
client
=
false
;
mod_config
()
->
client_mode
=
false
;
mod_config
()
->
client_mode
=
false
;
mod_config
()
->
insecure
=
false
;
mod_config
()
->
insecure
=
false
;
mod_config
()
->
cacert
=
0
;
mod_config
()
->
cacert
=
0
;
mod_config
()
->
pid_file
=
0
;
mod_config
()
->
uid
=
0
;
mod_config
()
->
gid
=
0
;
}
}
}
// namespace
}
// namespace
...
...
src/shrpx_config.cc
View file @
7a219053
...
@@ -74,42 +74,6 @@ const char SHRPX_OPT_CLIENT[] = "client";
...
@@ -74,42 +74,6 @@ const char SHRPX_OPT_CLIENT[] = "client";
const
char
SHRPX_OPT_INSECURE
[]
=
"insecure"
;
const
char
SHRPX_OPT_INSECURE
[]
=
"insecure"
;
const
char
SHRPX_OPT_CACERT
[]
=
"cacert"
;
const
char
SHRPX_OPT_CACERT
[]
=
"cacert"
;
Config
::
Config
()
:
verbose
(
false
),
daemon
(
false
),
host
(
0
),
port
(
0
),
private_key_file
(
0
),
cert_file
(
0
),
verify_client
(
false
),
server_name
(
0
),
downstream_host
(
0
),
downstream_port
(
0
),
downstream_hostport
(
0
),
downstream_addrlen
(
0
),
num_worker
(
0
),
spdy_max_concurrent_streams
(
0
),
spdy_proxy
(
false
),
client_proxy
(
false
),
add_x_forwarded_for
(
false
),
accesslog
(
false
),
spdy_upstream_window_bits
(
0
),
spdy_downstream_window_bits
(
0
),
pid_file
(
0
),
uid
(
0
),
gid
(
0
),
conf_path
(
0
),
syslog
(
false
),
syslog_facility
(
0
),
use_syslog
(
false
),
backlog
(
0
),
ciphers
(
0
),
client
(
false
),
client_mode
(
false
),
insecure
(
false
),
cacert
(
0
)
{}
namespace
{
namespace
{
Config
*
config
=
0
;
Config
*
config
=
0
;
}
// namespace
}
// namespace
...
...
src/shrpx_config.h
View file @
7a219053
...
@@ -116,7 +116,6 @@ struct Config {
...
@@ -116,7 +116,6 @@ struct Config {
bool
client_mode
;
bool
client_mode
;
bool
insecure
;
bool
insecure
;
char
*
cacert
;
char
*
cacert
;
Config
();
};
};
const
Config
*
get_config
();
const
Config
*
get_config
();
...
...
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