Skip to content

Commit

Permalink
bsock: tls connection as shared pointer
Browse files Browse the repository at this point in the history
- changed declaration
- copy constructor makes a copy of the pointer
  • Loading branch information
franku committed Aug 13, 2018
1 parent cf6cdeb commit 735a717
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions core/src/lib/bsock.cc
Expand Up @@ -105,6 +105,7 @@ BareosSocket::BareosSocket(const BareosSocket &other)
peer_addr = other.peer_addr;
local_daemon_type_ = other.local_daemon_type_;
remote_daemon_type_ = other.remote_daemon_type_;
tls_conn = other.tls_conn;

/* protected: */
jcr_ = other.jcr_;
Expand Down
2 changes: 1 addition & 1 deletion core/src/lib/bsock.h
Expand Up @@ -81,7 +81,7 @@ class DLL_IMP_EXP BareosSocket : public SmartAlloc {
}
BareosDaemonType local_daemon_type_;
BareosDaemonType remote_daemon_type_;
std::unique_ptr<Tls> tls_conn; /* Associated tls connection */
std::shared_ptr<Tls> tls_conn; /* Associated tls connection */

protected:
JobControlRecord *jcr_; /* JobControlRecord or NULL for error msgs */
Expand Down

0 comments on commit 735a717

Please sign in to comment.