Commit 6dd102cd authored by Pieter Hintjens's avatar Pieter Hintjens

Fixed issue #293

parent 1e4c5b29
/* /*
Copyright (c) 2007-2012 iMatix Corporation
Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2009-2011 250bpm s.r.o.
Copyright (c) 2007-2009 iMatix Corporation
Copyright (c) 2011 VMware, Inc. Copyright (c) 2011 VMware, Inc.
Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
...@@ -89,14 +89,14 @@ bool zmq::encoder_t::message_ready () ...@@ -89,14 +89,14 @@ bool zmq::encoder_t::message_ready ()
// message size. In both cases 'flags' field follows. // message size. In both cases 'flags' field follows.
if (size < 255) { if (size < 255) {
tmpbuf [0] = (unsigned char) size; tmpbuf [0] = (unsigned char) size;
tmpbuf [1] = (in_progress.flags () & ~msg_t::shared); tmpbuf [1] = (in_progress.flags () & msg_t::more);
next_step (tmpbuf, 2, &encoder_t::size_ready, next_step (tmpbuf, 2, &encoder_t::size_ready,
!(in_progress.flags () & msg_t::more)); !(in_progress.flags () & msg_t::more));
} }
else { else {
tmpbuf [0] = 0xff; tmpbuf [0] = 0xff;
put_uint64 (tmpbuf + 1, size); put_uint64 (tmpbuf + 1, size);
tmpbuf [9] = (in_progress.flags () & ~msg_t::shared); tmpbuf [9] = (in_progress.flags () & msg_t::more);
next_step (tmpbuf, 10, &encoder_t::size_ready, next_step (tmpbuf, 10, &encoder_t::size_ready,
!(in_progress.flags () & msg_t::more)); !(in_progress.flags () & msg_t::more));
} }
......
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