0
0
mirror of https://github.com/zeromq/libzmq.git synced 2025-01-17 12:58:12 +08:00

Was sending NULL mechanism name with extra null (fixed)

This commit is contained in:
Pieter Hintjens 2013-09-09 19:58:18 +02:00
parent 4c75306023
commit 635a03d240

View File

@ -196,7 +196,7 @@ void zmq::null_mechanism_t::send_zap_request ()
rc = session->write_zap_msg (&msg);
errno_assert (rc == 0);
// Identity frame
// Identity frame
rc = msg.init_size (options.identity_size);
errno_assert (rc == 0);
memcpy (msg.data (), options.identity, options.identity_size);
@ -205,9 +205,9 @@ void zmq::null_mechanism_t::send_zap_request ()
errno_assert (rc == 0);
// Mechanism frame
rc = msg.init_size (5);
rc = msg.init_size (4);
errno_assert (rc == 0);
memcpy (msg.data (), "NULL", 5);
memcpy (msg.data (), "NULL", 4);
rc = session->write_zap_msg (&msg);
errno_assert (rc == 0);
}