Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
55f0a550
Commit
55f0a550
authored
May 16, 2016
by
somdoron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
problem: dgram is not enforcing two-part message
parent
ded0e5a6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
dgram.cpp
src/dgram.cpp
+8
-4
No files found.
src/dgram.cpp
View file @
55f0a550
...
...
@@ -99,7 +99,7 @@ int zmq::dgram_t::xsend (msg_t *msg_)
// If this is the first part of the message it's the ID of the
// peer to send the message to.
if
(
!
more_out
)
{
if
(
!
more_out
)
{
if
(
!
(
msg_
->
flags
()
&
msg_t
::
more
))
{
errno
=
EINVAL
;
return
-
1
;
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment