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
9e000c8f
Commit
9e000c8f
authored
Oct 27, 2011
by
Ben Gray
Committed by
Martin Sustrik
Oct 27, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch for issue LIBZMQ-275. Dealing with VSM in distribution when pipes fail to write.
Signed-off-by:
Ben Gray
<
ben@benjamg.com
>
parent
68ab5f87
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
0 deletions
+17
-0
dist.cpp
src/dist.cpp
+10
-0
msg.cpp
src/msg.cpp
+6
-0
msg.hpp
src/msg.hpp
+1
-0
No files found.
src/dist.cpp
View file @
9e000c8f
...
...
@@ -137,6 +137,16 @@ void zmq::dist_t::distribute (msg_t *msg_, int flags_)
return
;
}
if
(
msg_
->
is_vsm
())
{
for
(
pipes_t
::
size_type
i
=
0
;
i
<
matching
;
++
i
)
write
(
pipes
[
i
],
msg_
);
int
rc
=
msg_
->
close
();
errno_assert
(
rc
==
0
);
rc
=
msg_
->
init
();
errno_assert
(
rc
==
0
);
return
;
}
// Add matching-1 references to the message. We already hold one reference,
// that's why -1.
msg_
->
add_refs
((
int
)
matching
-
1
);
...
...
src/msg.cpp
View file @
9e000c8f
...
...
@@ -237,6 +237,11 @@ bool zmq::msg_t::is_delimiter ()
return
u
.
base
.
type
==
type_delimiter
;
}
bool
zmq
::
msg_t
::
is_vsm
()
{
return
u
.
base
.
type
==
type_vsm
;
}
void
zmq
::
msg_t
::
add_refs
(
int
refs_
)
{
zmq_assert
(
refs_
>=
0
);
...
...
@@ -279,3 +284,4 @@ bool zmq::msg_t::rm_refs (int refs_)
return
true
;
}
src/msg.hpp
View file @
9e000c8f
...
...
@@ -68,6 +68,7 @@ namespace zmq
void
set_flags
(
unsigned
char
flags_
);
void
reset_flags
(
unsigned
char
flags_
);
bool
is_delimiter
();
bool
is_vsm
();
// After calling this function you can copy the message in POD-style
// refs_ times. No need to call copy.
...
...
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