diff --git a/builds/msvc/libzmq/libzmq11.vcxproj b/builds/msvc/libzmq/libzmq11.vcxproj index cfbcd6b5..153aa2f5 100644 --- a/builds/msvc/libzmq/libzmq11.vcxproj +++ b/builds/msvc/libzmq/libzmq11.vcxproj @@ -223,8 +223,10 @@ + + @@ -233,6 +235,7 @@ + @@ -253,6 +256,7 @@ + diff --git a/src/dealer.cpp b/src/dealer.cpp index d69ed762..c56b1915 100644 --- a/src/dealer.cpp +++ b/src/dealer.cpp @@ -65,7 +65,7 @@ int zmq::dealer_t::xsetsockopt (int option_, const void *optval_, switch (option_) { case ZMQ_PROBE_ROUTER: if (is_int && value >= 0) { - probe_router = value; + probe_router = (value != 0); return 0; } break; diff --git a/src/mutex.hpp b/src/mutex.hpp index 308f5eff..c72314df 100644 --- a/src/mutex.hpp +++ b/src/mutex.hpp @@ -52,7 +52,7 @@ namespace zmq inline bool try_lock () { - return (bool) TryEnterCriticalSection (&cs); + return (TryEnterCriticalSection (&cs)) ? true : false; } inline void unlock () diff --git a/src/req.cpp b/src/req.cpp index 8ab46ae1..554a918a 100644 --- a/src/req.cpp +++ b/src/req.cpp @@ -200,14 +200,14 @@ int zmq::req_t::xsetsockopt (int option_, const void *optval_, size_t optvallen_ switch (option_) { case ZMQ_REQ_REQUEST_IDS: if (is_int && value >= 0) { - request_id_frames_enabled = value; + request_id_frames_enabled = (value != 0); return 0; } break; case ZMQ_REQ_STRICT: if (is_int && value >= 0) { - strict = value; + strict = (value != 0); return 0; } break; diff --git a/src/router.cpp b/src/router.cpp index b9001414..9b6b74aa 100644 --- a/src/router.cpp +++ b/src/router.cpp @@ -89,7 +89,7 @@ int zmq::router_t::xsetsockopt (int option_, const void *optval_, switch (option_) { case ZMQ_ROUTER_RAW: if (is_int && value >= 0) { - raw_sock = value; + raw_sock = (value != 0); if (raw_sock) { options.recv_identity = false; options.raw_sock = true; @@ -100,14 +100,14 @@ int zmq::router_t::xsetsockopt (int option_, const void *optval_, case ZMQ_ROUTER_MANDATORY: if (is_int && value >= 0) { - mandatory = value; + mandatory = (value != 0); return 0; } break; case ZMQ_PROBE_ROUTER: if (is_int && value >= 0) { - probe_router = value; + probe_router = (value != 0); return 0; } break;