Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
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
Operations
Operations
Metrics
Environments
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
cpp-libs
Actor Framework
Commits
3da5e8e7
Commit
3da5e8e7
authored
Sep 22, 2017
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use strong ownership for SSL sessions
parent
2b67963a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
libcaf_openssl/caf/openssl/session.hpp
libcaf_openssl/caf/openssl/session.hpp
+4
-2
libcaf_openssl/src/middleman_actor.cpp
libcaf_openssl/src/middleman_actor.cpp
+2
-2
libcaf_openssl/src/session.cpp
libcaf_openssl/src/session.cpp
+1
-1
No files found.
libcaf_openssl/caf/openssl/session.hpp
View file @
3da5e8e7
...
@@ -20,6 +20,8 @@
...
@@ -20,6 +20,8 @@
#ifndef CAF_OPENSSL_SESSION_HPP
#ifndef CAF_OPENSSL_SESSION_HPP
#define CAF_OPENSSL_SESSION_HPP
#define CAF_OPENSSL_SESSION_HPP
#include <memory>
#include "caf/config.hpp"
#include "caf/config.hpp"
CAF_PUSH_WARNINGS
CAF_PUSH_WARNINGS
...
@@ -38,7 +40,7 @@ using native_socket = io::network::native_socket;
...
@@ -38,7 +40,7 @@ using native_socket = io::network::native_socket;
using
rw_state
=
io
::
network
::
rw_state
;
using
rw_state
=
io
::
network
::
rw_state
;
class
session
:
public
ref_counted
{
class
session
{
public:
public:
session
(
actor_system
&
sys
);
session
(
actor_system
&
sys
);
~
session
();
~
session
();
...
@@ -68,7 +70,7 @@ private:
...
@@ -68,7 +70,7 @@ private:
};
};
/// @relates session
/// @relates session
using
session_ptr
=
intrusiv
e_ptr
<
session
>
;
using
session_ptr
=
std
::
uniqu
e_ptr
<
session
>
;
/// @relates session
/// @relates session
session_ptr
make_session
(
actor_system
&
sys
,
native_socket
fd
,
session_ptr
make_session
(
actor_system
&
sys
,
native_socket
fd
,
...
...
libcaf_openssl/src/middleman_actor.cpp
View file @
3da5e8e7
...
@@ -50,7 +50,7 @@ using native_socket = io::network::native_socket;
...
@@ -50,7 +50,7 @@ using native_socket = io::network::native_socket;
using
default_mpx
=
io
::
network
::
default_multiplexer
;
using
default_mpx
=
io
::
network
::
default_multiplexer
;
struct
ssl_policy
{
struct
ssl_policy
{
ssl_policy
(
intrusive_ptr
<
session
>
session
)
:
session_
(
std
::
move
(
session
))
{
ssl_policy
(
session_ptr
session
)
:
session_
(
std
::
move
(
session
))
{
// nop
// nop
}
}
...
@@ -81,7 +81,7 @@ struct ssl_policy {
...
@@ -81,7 +81,7 @@ struct ssl_policy {
}
}
private:
private:
intrusive_ptr
<
session
>
session_
;
session_ptr
session_
;
};
};
class
scribe_impl
:
public
io
::
scribe
{
class
scribe_impl
:
public
io
::
scribe
{
...
...
libcaf_openssl/src/session.cpp
View file @
3da5e8e7
...
@@ -253,7 +253,7 @@ bool session::handle_ssl_result(int ret) {
...
@@ -253,7 +253,7 @@ bool session::handle_ssl_result(int ret) {
session_ptr
make_session
(
actor_system
&
sys
,
native_socket
fd
,
session_ptr
make_session
(
actor_system
&
sys
,
native_socket
fd
,
bool
from_accepted_socket
)
{
bool
from_accepted_socket
)
{
auto
ptr
=
make_counted
<
session
>
(
sys
)
;
session_ptr
ptr
{
new
session
(
sys
)}
;
if
(
!
ptr
->
init
())
if
(
!
ptr
->
init
())
return
nullptr
;
return
nullptr
;
if
(
from_accepted_socket
)
{
if
(
from_accepted_socket
)
{
...
...
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