Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
30e2398e
Commit
30e2398e
authored
Dec 11, 2019
by
Simon Giesecke
Committed by
Simon Giesecke
Dec 23, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: WSS-specific members and options are compiled without ZMQ_HAVE_WSS
Solution: properly guard members and options
parent
9e548bd5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
2 deletions
+12
-2
options.cpp
src/options.cpp
+2
-1
session_base.cpp
src/session_base.cpp
+8
-1
session_base.hpp
src/session_base.hpp
+2
-0
No files found.
src/options.cpp
View file @
30e2398e
...
...
@@ -786,6 +786,7 @@ int zmq::options_t::setsockopt (int option_,
}
break
;
#ifdef ZMQ_HAVE_WSS
case
ZMQ_WSS_KEY_PEM
:
// TODO: check if valid certificate
wss_key_pem
=
std
::
string
((
char
*
)
optval_
,
optvallen_
);
...
...
@@ -804,7 +805,7 @@ int zmq::options_t::setsockopt (int option_,
case
ZMQ_WSS_TRUST_SYSTEM
:
return
do_setsockopt_int_as_bool_strict
(
optval_
,
optvallen_
,
&
wss_trust_system
);
#endif
#endif
default
:
...
...
src/session_base.cpp
View file @
30e2398e
...
...
@@ -114,15 +114,20 @@ zmq::session_base_t::session_base_t (class io_thread_t *io_thread_,
_socket
(
socket_
),
_io_thread
(
io_thread_
),
_has_linger_timer
(
false
),
_addr
(
addr_
),
_addr
(
addr_
)
#ifdef ZMQ_HAVE_WSS
,
_wss_hostname
(
NULL
)
#endif
{
#ifdef ZMQ_HAVE_WSS
if
(
options_
.
wss_hostname
.
length
()
>
0
)
{
_wss_hostname
=
static_cast
<
char
*>
(
malloc
(
options_
.
wss_hostname
.
length
()
+
1
));
assert
(
_wss_hostname
);
strcpy
(
_wss_hostname
,
options_
.
wss_hostname
.
c_str
());
}
#endif
}
const
zmq
::
endpoint_uri_pair_t
&
zmq
::
session_base_t
::
get_endpoint
()
const
...
...
@@ -145,8 +150,10 @@ zmq::session_base_t::~session_base_t ()
if
(
_engine
)
_engine
->
terminate
();
#ifdef ZMQ_HAVE_WSS
if
(
_wss_hostname
)
free
(
_wss_hostname
);
#endif
LIBZMQ_DELETE
(
_addr
);
}
...
...
src/session_base.hpp
View file @
30e2398e
...
...
@@ -192,9 +192,11 @@ class session_base_t : public own_t, public io_object_t, public i_pipe_events
// Protocol and address to use when connecting.
address_t
*
_addr
;
#ifdef ZMQ_HAVE_WSS
// TLS handshake, we need to take a copy when the session is created,
// in order to maintain the value at the creation time
char
*
_wss_hostname
;
#endif
ZMQ_NON_COPYABLE_NOR_MOVABLE
(
session_base_t
)
};
...
...
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