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
b7e52755
Commit
b7e52755
authored
Feb 19, 2015
by
Constantin Rack
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1359 from rodgert/master
resolve #1347 addresses issue of no metadata on identity frame
parents
1e6e5b1c
700f7bfe
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
stream.cpp
src/stream.cpp
+6
-0
test_stream.cpp
tests/test_stream.cpp
+3
-0
No files found.
src/stream.cpp
View file @
b7e52755
...
...
@@ -255,6 +255,12 @@ bool zmq::stream_t::xhas_in ()
blob_t
identity
=
pipe
->
get_identity
();
rc
=
prefetched_id
.
init_size
(
identity
.
size
());
errno_assert
(
rc
==
0
);
// forward metadata (if any)
metadata_t
*
metadata
=
prefetched_msg
.
metadata
();
if
(
metadata
)
prefetched_id
.
set_metadata
(
metadata
);
memcpy
(
prefetched_id
.
data
(),
identity
.
data
(),
identity
.
size
());
prefetched_id
.
set_flags
(
msg_t
::
more
);
...
...
tests/test_stream.cpp
View file @
b7e52755
...
...
@@ -88,6 +88,9 @@ test_stream_to_dealer (void)
rc
=
zmq_recv
(
stream
,
buffer
,
255
,
0
);
assert
(
rc
==
0
);
// Verify the existence of Peer-Address metadata
assert
(
streq
(
zmq_msg_gets
(
&
identity
,
"Peer-Address"
),
"127.0.0.1"
));
// Real data follows
// First frame is identity
rc
=
zmq_msg_recv
(
&
identity
,
stream
,
0
);
...
...
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