mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-19 18:03:50 +00:00
Added test for ZMQ_CONNECT_RID
This commit is contained in:
parent
2f36f65f8f
commit
1d9b76c860
@ -622,6 +622,7 @@ set(tests
|
|||||||
test_timeo
|
test_timeo
|
||||||
test_many_sockets
|
test_many_sockets
|
||||||
test_diffserv
|
test_diffserv
|
||||||
|
test_connect_rid
|
||||||
)
|
)
|
||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
list(APPEND tests
|
list(APPEND tests
|
||||||
|
@ -402,6 +402,7 @@ bool zmq::router_t::identify_peer (pipe_t *pipe_)
|
|||||||
put_uint32 (buf + 1, next_rid++);
|
put_uint32 (buf + 1, next_rid++);
|
||||||
identity = blob_t (buf, sizeof buf);
|
identity = blob_t (buf, sizeof buf);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
if (!options.raw_sock) {
|
if (!options.raw_sock) {
|
||||||
// Pick up handshake cases and also case where next identity is set
|
// Pick up handshake cases and also case where next identity is set
|
||||||
msg.init ();
|
msg.init ();
|
||||||
@ -409,9 +410,6 @@ bool zmq::router_t::identify_peer (pipe_t *pipe_)
|
|||||||
if (!ok)
|
if (!ok)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (connect_rid_used) // we read but do not use identity from peer
|
|
||||||
msg.close();
|
|
||||||
else
|
|
||||||
if (msg.size () == 0) {
|
if (msg.size () == 0) {
|
||||||
// Fall back on the auto-generation
|
// Fall back on the auto-generation
|
||||||
unsigned char buf [5];
|
unsigned char buf [5];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user