mirror of
https://github.com/zeromq/libzmq.git
synced 2025-11-01 11:52:57 +01:00
Merge branch 'master' of https://github.com/zeromq/libzmq
This commit is contained in:
@@ -145,7 +145,7 @@ bool zmq::decoder_t::eight_byte_size_ready ()
|
||||
bool zmq::decoder_t::flags_ready ()
|
||||
{
|
||||
// Store the flags from the wire into the message structure.
|
||||
in_progress.set_flags (tmpbuf [0]);
|
||||
in_progress.set_flags (tmpbuf [0] & msg_t::more);
|
||||
|
||||
next_step (in_progress.data (), in_progress.size (),
|
||||
&decoder_t::message_ready);
|
||||
|
||||
10
src/fq.cpp
10
src/fq.cpp
@@ -84,11 +84,6 @@ int zmq::fq_t::recvpipe (msg_t *msg_, pipe_t **pipe_)
|
||||
// subsequent part should be immediately available.
|
||||
bool fetched = pipes [current]->read (msg_);
|
||||
|
||||
// Check the atomicity of the message. If we've already received the
|
||||
// first part of the message we should get the remaining parts
|
||||
// without blocking.
|
||||
zmq_assert (!more || fetched);
|
||||
|
||||
// Note that when message is not fetched, current pipe is deactivated
|
||||
// and replaced by another active pipe. Thus we don't have to increase
|
||||
// the 'current' pointer.
|
||||
@@ -101,6 +96,11 @@ int zmq::fq_t::recvpipe (msg_t *msg_, pipe_t **pipe_)
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Check the atomicity of the message.
|
||||
// If we've already received the first part of the message
|
||||
// we should get the remaining parts without blocking.
|
||||
zmq_assert (!more);
|
||||
|
||||
active--;
|
||||
pipes.swap (current, active);
|
||||
if (current == active)
|
||||
|
||||
@@ -298,7 +298,7 @@ int zmq::signaler_t::make_fdpair (fd_t *r_, fd_t *w_)
|
||||
wsa_assert (rc != SOCKET_ERROR);
|
||||
|
||||
// Connect writer to the listener.
|
||||
rc = connect (*w_, (sockaddr *) &addr, sizeof (addr));
|
||||
rc = connect (*w_, (struct sockaddr*) &addr, sizeof (addr));
|
||||
wsa_assert (rc != SOCKET_ERROR);
|
||||
|
||||
// Accept connection from writer.
|
||||
@@ -327,7 +327,7 @@ int zmq::signaler_t::make_fdpair (fd_t *r_, fd_t *w_)
|
||||
//
|
||||
// The bug will be fixed in V5.6 ECO4 and beyond. In the meantime, we'll
|
||||
// create the socket pair manually.
|
||||
sockaddr_in lcladdr;
|
||||
struct sockaddr_in lcladdr;
|
||||
memset (&lcladdr, 0, sizeof (lcladdr));
|
||||
lcladdr.sin_family = AF_INET;
|
||||
lcladdr.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
|
||||
|
||||
Reference in New Issue
Block a user