mirror of
https://github.com/zeromq/cppzmq.git
synced 2024-12-13 18:55:11 +01:00
Merge pull request #59 from dquam/patch-1
Fix usage of zmq_msg_recv and zmq_recvmsg
This commit is contained in:
commit
bad35bdbfe
6
zmq.hpp
6
zmq.hpp
@ -88,7 +88,7 @@ typedef struct {
|
|||||||
|
|
||||||
// Avoid using deprecated message receive function when possible
|
// Avoid using deprecated message receive function when possible
|
||||||
#if ZMQ_VERSION < ZMQ_MAKE_VERSION(3, 2, 0)
|
#if ZMQ_VERSION < ZMQ_MAKE_VERSION(3, 2, 0)
|
||||||
# define zmq_msg_recv zmq_recvmsg
|
# define zmq_msg_recv(msg, socket, flags) zmq_recvmsg(socket, msg, flags)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -663,7 +663,7 @@ namespace zmq
|
|||||||
while (true) {
|
while (true) {
|
||||||
zmq_msg_t eventMsg;
|
zmq_msg_t eventMsg;
|
||||||
zmq_msg_init (&eventMsg);
|
zmq_msg_init (&eventMsg);
|
||||||
rc = zmq_msg_recv (s, &eventMsg, 0);
|
rc = zmq_msg_recv (&eventMsg, s, 0);
|
||||||
if (rc == -1 && zmq_errno() == ETERM)
|
if (rc == -1 && zmq_errno() == ETERM)
|
||||||
break;
|
break;
|
||||||
assert (rc != -1);
|
assert (rc != -1);
|
||||||
@ -680,7 +680,7 @@ namespace zmq
|
|||||||
#ifdef ZMQ_NEW_MONITOR_EVENT_LAYOUT
|
#ifdef ZMQ_NEW_MONITOR_EVENT_LAYOUT
|
||||||
zmq_msg_t addrMsg;
|
zmq_msg_t addrMsg;
|
||||||
zmq_msg_init (&addrMsg);
|
zmq_msg_init (&addrMsg);
|
||||||
rc = zmq_msg_recv (s, &addrMsg, 0);
|
rc = zmq_msg_recv (&addrMsg, s, 0);
|
||||||
if (rc == -1 && zmq_errno() == ETERM)
|
if (rc == -1 && zmq_errno() == ETERM)
|
||||||
break;
|
break;
|
||||||
assert (rc != -1);
|
assert (rc != -1);
|
||||||
|
Loading…
Reference in New Issue
Block a user