mirror of
https://github.com/zeromq/libzmq.git
synced 2025-02-23 15:14:40 +01:00
Problem: bug in tipc_listener_t::set_address, random port is determined but not used
Solution: assign result to address Fixes #3376
This commit is contained in:
parent
afe48e2b16
commit
ae79b41d4c
@ -166,7 +166,7 @@ int zmq::tipc_listener_t::set_address (const char *addr_)
|
||||
if (rc != 0)
|
||||
goto error;
|
||||
|
||||
tipc_address_t addr ((struct sockaddr *) &ss, sl);
|
||||
address = tipc_address_t ((struct sockaddr *) &ss, sl);
|
||||
}
|
||||
|
||||
|
||||
|
@ -91,6 +91,9 @@ void test_tipc_port_identity ()
|
||||
rc = sscanf (&endpoint[0], "tipc://<%u.%u.%u:%u>", &z, &c, &n, &ref);
|
||||
TEST_ASSERT_EQUAL_INT (4, rc);
|
||||
|
||||
TEST_ASSERT_NOT_EQUAL_MESSAGE (
|
||||
0, ref, "tipc port number must not be 0 after random assignment");
|
||||
|
||||
rc = zmq_connect (sc, endpoint);
|
||||
TEST_ASSERT_EQUAL_INT (0, rc);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user