Commit a5ef5014 authored by Pieter Hintjens's avatar Pieter Hintjens

Merge pull request #516 from SRombauts/master

Corrected some more linking errors in MSVC build
parents a8dfcb3c 927000fe
...@@ -402,6 +402,14 @@ ...@@ -402,6 +402,14 @@
RelativePath="..\..\..\src\random.cpp" RelativePath="..\..\..\src\random.cpp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\raw_decoder.cpp"
>
</File>
<File
RelativePath="..\..\..\src\raw_encoder.cpp"
>
</File>
<File <File
RelativePath="..\..\..\src\reaper.cpp" RelativePath="..\..\..\src\reaper.cpp"
> >
...@@ -692,6 +700,14 @@ ...@@ -692,6 +700,14 @@
RelativePath="..\..\..\src\random.hpp" RelativePath="..\..\..\src\random.hpp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\raw_decoder.hpp"
>
</File>
<File
RelativePath="..\..\..\src\raw_encoder.hpp"
>
</File>
<File <File
RelativePath="..\..\..\src\reaper.hpp" RelativePath="..\..\..\src\reaper.hpp"
> >
......
...@@ -143,7 +143,7 @@ int zmq::ctx_t::set (int option_, int optval_) ...@@ -143,7 +143,7 @@ int zmq::ctx_t::set (int option_, int optval_)
else else
if (option_ == ZMQ_IPV6 && optval_ >= 0) { if (option_ == ZMQ_IPV6 && optval_ >= 0) {
opt_sync.lock (); opt_sync.lock ();
ipv6 = optval_; ipv6 = (optval_ != 0);
opt_sync.unlock (); opt_sync.unlock ();
} }
else { else {
......
...@@ -185,7 +185,7 @@ int zmq::options_t::setsockopt (int option_, const void *optval_, ...@@ -185,7 +185,7 @@ int zmq::options_t::setsockopt (int option_, const void *optval_,
/* Deprecated in favor of ZMQ_IPV6 */ /* Deprecated in favor of ZMQ_IPV6 */
case ZMQ_IPV4ONLY: case ZMQ_IPV4ONLY:
if (is_int && (value == 0 || value == 1)) if (is_int && (value == 0 || value == 1))
ipv6 = 1 - value; ipv6 = (value == 0);
else else
valid = false; valid = false;
break; break;
...@@ -193,7 +193,7 @@ int zmq::options_t::setsockopt (int option_, const void *optval_, ...@@ -193,7 +193,7 @@ int zmq::options_t::setsockopt (int option_, const void *optval_,
/* To replace the somewhat surprising IPV4ONLY */ /* To replace the somewhat surprising IPV4ONLY */
case ZMQ_IPV6: case ZMQ_IPV6:
if (is_int && (value == 0 || value == 1)) if (is_int && (value == 0 || value == 1))
ipv6 = value; ipv6 = (value != 0);
else else
valid = false; valid = false;
break; break;
......
...@@ -88,14 +88,14 @@ int zmq::router_t::xsetsockopt (int option_, const void *optval_, ...@@ -88,14 +88,14 @@ int zmq::router_t::xsetsockopt (int option_, const void *optval_,
return -1; return -1;
} }
if (option_ == ZMQ_ROUTER_RAW) { if (option_ == ZMQ_ROUTER_RAW) {
raw_sock = *static_cast <const int*> (optval_); raw_sock = (*static_cast <const int*> (optval_) != 0);
if (raw_sock) { if (raw_sock) {
options.recv_identity = false; options.recv_identity = false;
options.raw_sock = true; options.raw_sock = true;
} }
} }
else else
mandatory = *static_cast <const int*> (optval_); mandatory = (*static_cast <const int*> (optval_) != 0);
return 0; return 0;
} }
......
...@@ -135,7 +135,7 @@ zmq::socket_base_t::socket_base_t (ctx_t *parent_, uint32_t tid_, int sid_) : ...@@ -135,7 +135,7 @@ zmq::socket_base_t::socket_base_t (ctx_t *parent_, uint32_t tid_, int sid_) :
monitor_events (0) monitor_events (0)
{ {
options.socket_id = sid_; options.socket_id = sid_;
options.ipv6 = parent_->get (ZMQ_IPV6); options.ipv6 = (parent_->get (ZMQ_IPV6) != 0);
} }
zmq::socket_base_t::~socket_base_t () zmq::socket_base_t::~socket_base_t ()
......
...@@ -98,7 +98,7 @@ int zmq::xpub_t::xsetsockopt (int option_, const void *optval_, ...@@ -98,7 +98,7 @@ int zmq::xpub_t::xsetsockopt (int option_, const void *optval_,
errno = EINVAL; errno = EINVAL;
return -1; return -1;
} }
verbose = *static_cast <const int*> (optval_); verbose = (*static_cast <const int*> (optval_) != 0);
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment