mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-27 15:41:05 +08:00
Problem: libzmq does not advertise ZMTP 3.1
Solution: bump minor version number in the engine as all 3.1 features are now implemented
This commit is contained in:
parent
253e9dd27b
commit
38b6888c3e
@ -205,7 +205,7 @@ void zmq::zmtp_engine_t::receive_greeting_versioned ()
|
||||
|| _greeting_recv[revision_pos] == ZMTP_2_0)
|
||||
_outpos[_outsize++] = _options.type;
|
||||
else {
|
||||
_outpos[_outsize++] = 0; // Minor version number
|
||||
_outpos[_outsize++] = 1; // Minor version number
|
||||
memset (_outpos + _outsize, 0, 20);
|
||||
|
||||
zmq_assert (_options.mechanism == ZMQ_NULL
|
||||
|
@ -40,7 +40,7 @@ typedef uint8_t byte;
|
||||
typedef struct
|
||||
{
|
||||
byte signature[10]; // 0xFF 8*0x00 0x7F
|
||||
byte version[2]; // 0x03 0x00 for ZMTP/3.0
|
||||
byte version[2]; // 0x03 0x01 for ZMTP/3.1
|
||||
byte mechanism[20]; // "NULL"
|
||||
byte as_server;
|
||||
byte filler[31];
|
||||
@ -52,7 +52,7 @@ typedef struct
|
||||
// 8-byte size is set to 1 for backwards compatibility
|
||||
|
||||
static zmtp_greeting_t greeting = {
|
||||
{0xFF, 0, 0, 0, 0, 0, 0, 0, 1, 0x7F}, {3, 0}, {'N', 'U', 'L', 'L'}, 0, {0}};
|
||||
{0xFF, 0, 0, 0, 0, 0, 0, 0, 1, 0x7F}, {3, 1}, {'N', 'U', 'L', 'L'}, 0, {0}};
|
||||
|
||||
static void test_stream_to_dealer ()
|
||||
{
|
||||
@ -135,8 +135,8 @@ static void test_stream_to_dealer ()
|
||||
}
|
||||
|
||||
// First two bytes are major and minor version numbers.
|
||||
TEST_ASSERT_EQUAL_INT (3, buffer[0]); // ZMTP/3.0
|
||||
TEST_ASSERT_EQUAL_INT (0, buffer[1]);
|
||||
TEST_ASSERT_EQUAL_INT (3, buffer[0]); // ZMTP/3.1
|
||||
TEST_ASSERT_EQUAL_INT (1, buffer[1]);
|
||||
|
||||
// Mechanism is "NULL"
|
||||
TEST_ASSERT_EQUAL_INT8_ARRAY (buffer + 2,
|
||||
|
Loading…
x
Reference in New Issue
Block a user