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
2b80dd7a
Commit
2b80dd7a
authored
Mar 24, 2019
by
Simon Giesecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: test_bind used with explicit endpoint where bind_loopback_ipv4 could be used
Solution: use bind_loopback_ipv4 instead
parent
454c0b83
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
9 deletions
+4
-9
test_app_meta.cpp
tests/test_app_meta.cpp
+1
-2
test_router_notify.cpp
tests/test_router_notify.cpp
+3
-7
No files found.
tests/test_app_meta.cpp
View file @
2b80dd7a
...
...
@@ -87,8 +87,7 @@ void test_app_meta_reqrep ()
TEST_ASSERT_EQUAL_INT
(
-
1
,
rc
);
}
test_bind
(
rep_sock
,
"tcp://127.0.0.1:*"
,
connect_address
,
sizeof
(
connect_address
));
bind_loopback_ipv4
(
rep_sock
,
connect_address
,
sizeof
connect_address
);
l
=
0
;
rc
=
zmq_setsockopt
(
req_sock
,
ZMQ_LINGER
,
&
l
,
sizeof
(
l
));
...
...
tests/test_router_notify.cpp
View file @
2b80dd7a
...
...
@@ -159,8 +159,7 @@ void test_router_notify_helper (int opt_notify)
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_setsockopt
(
router
,
ZMQ_ROUTER_NOTIFY
,
&
opt_notify
,
sizeof
(
opt_notify
)));
test_bind
(
router
,
"tcp://127.0.0.1:*"
,
connect_address
,
sizeof
(
connect_address
));
bind_loopback_ipv4
(
router
,
connect_address
,
sizeof
connect_address
);
void
*
dealer
=
test_context_socket
(
ZMQ_DEALER
);
const
char
*
dealer_routing_id
=
"X"
;
...
...
@@ -246,8 +245,7 @@ void test_handshake_fail ()
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_setsockopt
(
router
,
ZMQ_RCVTIMEO
,
&
opt_timeout
,
sizeof
(
opt_timeout
)));
test_bind
(
router
,
"tcp://127.0.0.1:*"
,
connect_address
,
sizeof
(
connect_address
));
bind_loopback_ipv4
(
router
,
connect_address
,
sizeof
connect_address
);
// send something on raw tcp
void
*
stream
=
test_context_socket
(
ZMQ_STREAM
);
...
...
@@ -291,9 +289,7 @@ void test_error_during_multipart ()
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_setsockopt
(
router
,
ZMQ_MAXMSGSIZE
,
&
opt_maxmsgsize
,
sizeof
(
opt_maxmsgsize
)));
test_bind
(
router
,
"tcp://127.0.0.1:*"
,
connect_address
,
sizeof
(
connect_address
));
bind_loopback_ipv4
(
router
,
connect_address
,
sizeof
connect_address
);
// setup dealer
void
*
dealer
=
test_context_socket
(
ZMQ_DEALER
);
...
...
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