Commit 0f891e09 authored by Martin Sustrik's avatar Martin Sustrik

message flags from the wire are written to zmq_msg_t and vice versa

parent 531c6af0
......@@ -112,8 +112,8 @@ bool zmq::zmq_decoder_t::eight_byte_size_ready ()
bool zmq::zmq_decoder_t::flags_ready ()
{
// No flags are accepted at the moment.
zmq_assert (tmpbuf [0] == 0);
// Store the flags from the wire into the message structure.
in_progress.flags = tmpbuf [0];
if (prefix.empty ()) {
next_step (zmq_msg_data (&in_progress), zmq_msg_size (&in_progress),
......
......@@ -97,13 +97,13 @@ bool zmq::zmq_encoder_t::message_ready ()
// message size. In both cases empty 'flags' field follows.
if (size < 255) {
tmpbuf [0] = (unsigned char) size;
tmpbuf [1] = 0;
tmpbuf [1] = (in_progress.flags & ~ZMQ_MSG_SHARED);
next_step (tmpbuf, 2, &zmq_encoder_t::size_ready, true);
}
else {
tmpbuf [0] = 0xff;
put_uint64 (tmpbuf + 1, size);
tmpbuf [9] = 0;
tmpbuf [9] = (in_progress.flags & ~ZMQ_MSG_SHARED);
next_step (tmpbuf, 10, &zmq_encoder_t::size_ready, true);
}
return true;
......
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