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
d0667461
Commit
d0667461
authored
Jun 17, 2014
by
Pieter Hintjens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed build: malformed only defined when needed.
parent
b4ed3f55
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
options.cpp
src/options.cpp
+4
-1
No files found.
src/options.cpp
View file @
d0667461
...
...
@@ -65,8 +65,9 @@ int zmq::options_t::setsockopt (int option_, const void *optval_,
{
bool
is_int
=
(
optvallen_
==
sizeof
(
int
));
int
value
=
is_int
?
*
((
int
*
)
optval_
)
:
0
;
#if defined (ZMQ_ACT_MILITANT)
bool
malformed
=
true
;
// Did caller pass a bad option value?
#endif
switch
(
option_
)
{
case
ZMQ_SNDHWM
:
if
(
is_int
&&
value
>=
0
)
{
...
...
@@ -442,11 +443,13 @@ int zmq::options_t::setsockopt (int option_, const void *optval_,
break
;
default
:
#if defined (ZMQ_ACT_MILITANT)
// There are valid scenarios for probing with unknown socket option
// values, e.g. to check if security is enabled or not. This will not
// provoke a militant assert. However, passing bad values to a valid
// socket option will, if ZMQ_ACT_MILITANT is defined.
malformed
=
false
;
#endif
break
;
}
#if defined (ZMQ_ACT_MILITANT)
...
...
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