mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-04 07:27:26 +01:00
problem: dgram is not enforcing two-part message
This commit is contained in:
parent
ded0e5a6d9
commit
55f0a5503e
@ -109,6 +109,13 @@ int zmq::dgram_t::xsend (msg_t *msg_)
|
||||
more_out = true;
|
||||
}
|
||||
else {
|
||||
|
||||
// dgram messages are two part only, reject part if more is set
|
||||
if (msg_->flags () & msg_t::more) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
// This is the last part of the message.
|
||||
more_out = false;
|
||||
}
|
||||
@ -158,9 +165,6 @@ bool zmq::dgram_t::xhas_in ()
|
||||
|
||||
bool zmq::dgram_t::xhas_out ()
|
||||
{
|
||||
//if (more_out)
|
||||
// return false;
|
||||
|
||||
if (!pipe)
|
||||
return false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user