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
92923cd4
Commit
92923cd4
authored
Aug 28, 2010
by
Martin Sustrik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug in pipe deactivation fixed
parent
035c937e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
11 deletions
+10
-11
pipe.cpp
src/pipe.cpp
+3
-5
socket_base.cpp
src/socket_base.cpp
+1
-1
test_pair.cpp
tests/test_pair.cpp
+4
-3
test_reqrep.cpp
tests/test_reqrep.cpp
+2
-2
No files found.
src/pipe.cpp
View file @
92923cd4
...
...
@@ -80,11 +80,8 @@ bool zmq::reader_t::check_read ()
return
false
;
// Check if there's an item in the pipe.
// If not, deactivate the pipe.
if
(
!
pipe
->
check_read
())
{
terminate
();
if
(
!
pipe
->
check_read
())
return
false
;
}
// If the next item in the pipe is message delimiter,
// initiate its termination.
...
...
@@ -198,7 +195,8 @@ bool zmq::writer_t::check_write ()
if
(
terminating
)
return
false
;
if
(
pipe_full
()
&&
(
msg_store
==
NULL
||
msg_store
->
full
()
||
extra_msg_flag
))
{
if
(
pipe_full
()
&&
(
msg_store
==
NULL
||
msg_store
->
full
()
||
extra_msg_flag
))
{
stalled
=
true
;
return
false
;
}
...
...
src/socket_base.cpp
View file @
92923cd4
...
...
@@ -244,7 +244,7 @@ int zmq::socket_base_t::getsockopt (int option_, void *optval_,
errno
=
EINVAL
;
return
-
1
;
}
process_commands
(
false
,
false
);
process_commands
(
false
,
false
);
*
((
uint32_t
*
)
optval_
)
=
0
;
if
(
has_out
())
*
((
uint32_t
*
)
optval_
)
|=
ZMQ_POLLOUT
;
...
...
tests/test_pair.cpp
View file @
92923cd4
...
...
@@ -39,9 +39,10 @@ int main ()
{
const
string
returned
=
zmqtestutil
::
ping_pong
(
p
,
expect
);
assert
(
expect
==
returned
);
// Adjust socket state so that poll shows only 1 pending message.
zmq
::
message_t
mx
;
p
.
first
->
recv
(
&
mx
,
0
);
p
.
first
->
recv
(
&
mx
,
0
);
}
{
...
...
@@ -58,8 +59,7 @@ int main ()
p
.
first
->
send
(
m1
,
0
);
// Now use polling. Timout makes test abort on error.
int
rc
=
zmq
::
poll
(
&
items
[
0
],
2
,
1000
);
int
rc
=
zmq
::
poll
(
&
items
[
0
],
2
,
-
1
);
assert
(
rc
==
1
);
assert
((
items
[
1
].
revents
&
ZMQ_POLLIN
)
!=
0
);
...
...
@@ -74,4 +74,5 @@ int main ()
delete
(
p
.
second
);
return
0
;
assert
(
false
);
}
tests/test_reqrep.cpp
View file @
92923cd4
...
...
@@ -39,6 +39,7 @@ int main()
{
const
string
returned
=
zmqtestutil
::
ping_pong
(
p
,
expect
);
assert
(
expect
==
returned
);
// Adjust socket state, so that first is clean for another send.
zmq
::
message_t
mx
;
p
.
first
->
recv
(
&
mx
,
0
);
...
...
@@ -58,8 +59,7 @@ int main()
p
.
first
->
send
(
m1
,
0
);
// Now use polling. Timout makes test abort on error.
int
rc
=
zmq
::
poll
(
&
items
[
0
],
2
,
1000
);
int
rc
=
zmq
::
poll
(
&
items
[
0
],
2
,
-
1
);
assert
(
rc
==
1
);
assert
((
items
[
1
].
revents
&
ZMQ_POLLIN
)
!=
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