Multi-hop REQ/REP, part VI., session 'name' renamed to 'peer_identity'

This commit is contained in:
Martin Sustrik
2010-02-13 09:09:40 +01:00
parent 2e78e48503
commit 923eacd28a
3 changed files with 21 additions and 16 deletions

View File

@@ -168,7 +168,8 @@ void zmq::zmq_init_t::finalise ()
if (!session) {
session = new (std::nothrow) session_t (
choose_io_thread (options.affinity), owner, options,
peer_identity.c_str ());
(unsigned char) peer_identity.size (),
(unsigned char*) peer_identity.c_str ());
zmq_assert (session);
send_plug (session);
send_own (owner, session);
@@ -182,7 +183,7 @@ void zmq::zmq_init_t::finalise ()
// transient session.
else {
session = new (std::nothrow) session_t (
choose_io_thread (options.affinity), owner, options, NULL);
choose_io_thread (options.affinity), owner, options, 0, NULL);
zmq_assert (session);
send_plug (session);
send_own (owner, session);
@@ -191,7 +192,7 @@ void zmq::zmq_init_t::finalise ()
session->inc_seqnum ();
}
// No need to increment seqnum as it was laready incremented above.
// No need to increment seqnum as it was already incremented above.
send_attach (session, engine, (unsigned char) peer_identity.size (),
(unsigned char*) peer_identity.data (), false);