mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-29 04:17:57 +01:00
Problem: code from bind_loopback_ipv4 is duplicated
Solution: call bind_loopback_ipv4 where applicable
This commit is contained in:
@@ -43,13 +43,10 @@ void client_thread (void *client_)
|
||||
|
||||
void test_thread_safe ()
|
||||
{
|
||||
size_t len = MAX_SOCKET_STRING;
|
||||
char my_endpoint[MAX_SOCKET_STRING];
|
||||
|
||||
void *server = test_context_socket (ZMQ_SERVER);
|
||||
TEST_ASSERT_SUCCESS_ERRNO (zmq_bind (server, "tcp://127.0.0.1:*"));
|
||||
TEST_ASSERT_SUCCESS_ERRNO (
|
||||
zmq_getsockopt (server, ZMQ_LAST_ENDPOINT, my_endpoint, &len));
|
||||
bind_loopback_ipv4 (server, my_endpoint, sizeof my_endpoint);
|
||||
|
||||
void *client = test_context_socket (ZMQ_CLIENT);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user