From 1d9b76c860b3575bbe956cce461e6c001f497e2f Mon Sep 17 00:00:00 2001 From: Tim M Date: Sun, 19 Jan 2014 15:59:43 -0800 Subject: [PATCH] Added test for ZMQ_CONNECT_RID --- CMakeLists.txt | 1 + src/router.cpp | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 27c2050c..5e47a998 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -622,6 +622,7 @@ set(tests test_timeo test_many_sockets test_diffserv + test_connect_rid ) if(NOT WIN32) list(APPEND tests diff --git a/src/router.cpp b/src/router.cpp index 3b7f1ac9..a2c17e5a 100644 --- a/src/router.cpp +++ b/src/router.cpp @@ -402,6 +402,7 @@ bool zmq::router_t::identify_peer (pipe_t *pipe_) put_uint32 (buf + 1, next_rid++); identity = blob_t (buf, sizeof buf); } + else if (!options.raw_sock) { // Pick up handshake cases and also case where next identity is set msg.init (); @@ -409,9 +410,6 @@ bool zmq::router_t::identify_peer (pipe_t *pipe_) if (!ok) return false; - if (connect_rid_used) // we read but do not use identity from peer - msg.close(); - else if (msg.size () == 0) { // Fall back on the auto-generation unsigned char buf [5];