Multi-hop REQ/REP, part VII., identity-related algorithms rewritten

This commit is contained in:
Martin Sustrik
2010-02-13 13:07:33 +01:00
parent 923eacd28a
commit cdc2efe9b5
5 changed files with 94 additions and 70 deletions

View File

@@ -164,7 +164,9 @@ void zmq::zmq_init_t::finalise ()
// If the peer has a unique name, find the associated session. If it
// doesn't exist, create it.
else if (!peer_identity.empty ()) {
session = owner->find_session (peer_identity.c_str ());
session = owner->find_session (
(unsigned char) peer_identity.size (),
(unsigned char*) peer_identity.data ());
if (!session) {
session = new (std::nothrow) session_t (
choose_io_thread (options.affinity), owner, options,