Commit eb80fa31 authored by somdoron's avatar somdoron

problem: dgram more out logic was incorrect

parent 47c0b6ec
...@@ -100,17 +100,15 @@ int zmq::dgram_t::xsend (msg_t *msg_) ...@@ -100,17 +100,15 @@ int zmq::dgram_t::xsend (msg_t *msg_)
// If this is the first part of the message it's the ID of the // If this is the first part of the message it's the ID of the
// peer to send the message to. // peer to send the message to.
if (!more_out) { if (!more_out) {
// If we have malformed message (prefix with no subsequent message) then ignore it. if (!(msg_->flags () & msg_t::more)) {
if (msg_->flags () & msg_t::more) {
errno = EINVAL; errno = EINVAL;
return -1; return -1;
} }
// Expect one more message frame. // Expect one more message frame.
more_out = true; more_out = true;
} }
else { else {
// Ignore the MORE flag
msg_->reset_flags (msg_t::more);
// This is the last part of the message. // This is the last part of the message.
more_out = false; more_out = false;
} }
......
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