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
0963f389
Commit
0963f389
authored
Oct 17, 2018
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Convert SerialEventType to enum class
parent
1abfa3ca
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
src/shrpx_connection_handler.cc
src/shrpx_connection_handler.cc
+5
-2
src/shrpx_connection_handler.h
src/shrpx_connection_handler.h
+8
-6
No files found.
src/shrpx_connection_handler.cc
View file @
0963f389
...
...
@@ -828,7 +828,7 @@ void ConnectionHandler::handle_serial_event() {
for
(
auto
&
sev
:
q
)
{
switch
(
sev
.
type
)
{
case
S
EV_
REPLACE_DOWNSTREAM
:
case
S
erialEventType
:
:
REPLACE_DOWNSTREAM
:
// Mmake sure that none of worker uses
// get_config()->conn.downstream
mod_config
()
->
conn
.
downstream
=
sev
.
downstreamconf
;
...
...
@@ -841,6 +841,8 @@ void ConnectionHandler::handle_serial_event() {
worker_replace_downstream
(
sev
.
downstreamconf
);
break
;
default:
break
;
}
}
...
...
@@ -848,7 +850,8 @@ void ConnectionHandler::handle_serial_event() {
void
ConnectionHandler
::
send_replace_downstream
(
const
std
::
shared_ptr
<
DownstreamConfig
>
&
downstreamconf
)
{
send_serial_event
(
SerialEvent
(
SEV_REPLACE_DOWNSTREAM
,
downstreamconf
));
send_serial_event
(
SerialEvent
(
SerialEventType
::
REPLACE_DOWNSTREAM
,
downstreamconf
));
}
void
ConnectionHandler
::
send_serial_event
(
SerialEvent
ev
)
{
...
...
src/shrpx_connection_handler.h
View file @
0963f389
...
...
@@ -84,17 +84,18 @@ struct OCSPUpdateContext {
};
// SerialEvent is an event sent from Worker thread.
enum
SerialEventType
{
SEV_
NONE
,
SEV_
REPLACE_DOWNSTREAM
,
enum
class
SerialEventType
{
NONE
,
REPLACE_DOWNSTREAM
,
};
struct
SerialEvent
{
// ctor for event uses DownstreamConfig
SerialEvent
(
int
type
,
const
std
::
shared_ptr
<
DownstreamConfig
>
&
downstreamconf
)
SerialEvent
(
SerialEventType
type
,
const
std
::
shared_ptr
<
DownstreamConfig
>
&
downstreamconf
)
:
type
(
type
),
downstreamconf
(
downstreamconf
)
{}
int
type
;
SerialEventType
type
;
std
::
shared_ptr
<
DownstreamConfig
>
downstreamconf
;
};
...
...
@@ -163,7 +164,8 @@ public:
void
set_neverbleed
(
neverbleed_t
*
nb
);
#endif // HAVE_NEVERBLEED
// Send SerialEvent SEV_REPLACE_DOWNSTREAM to this object.
// Send SerialEvent SerialEventType::REPLACE_DOWNSTREAM to this
// object.
void
send_replace_downstream
(
const
std
::
shared_ptr
<
DownstreamConfig
>
&
downstreamconf
);
// Internal function to send |ev| to this object.
...
...
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