summaryrefslogtreecommitdiff
path: root/community/zeromq/LIBZMQ-569.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/zeromq/LIBZMQ-569.patch')
-rw-r--r--community/zeromq/LIBZMQ-569.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/community/zeromq/LIBZMQ-569.patch b/community/zeromq/LIBZMQ-569.patch
new file mode 100644
index 000000000..a1e27f622
--- /dev/null
+++ b/community/zeromq/LIBZMQ-569.patch
@@ -0,0 +1,30 @@
+From 7ecab54ac3b7a6103c46892990217acafb039eed Mon Sep 17 00:00:00 2001
+From: Martin Hurton <hurtonm@gmail.com>
+Date: Fri, 21 Jun 2013 16:23:38 +0200
+Subject: [PATCH] Load identity message to decoder at start
+
+---
+ src/stream_engine.cpp | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/stream_engine.cpp b/src/stream_engine.cpp
+index 0d87581..2c07889 100644
+--- a/src/stream_engine.cpp
++++ b/src/stream_engine.cpp
+@@ -480,6 +480,13 @@ bool zmq::stream_engine_t::handshake ()
+ // header data away.
+ const size_t header_size = options.identity_size + 1 >= 255 ? 10 : 2;
+ unsigned char tmp [10], *bufferp = tmp;
++
++ // Prepare the identity message and load it into encoder.
++ // Then consume bytes we have already sent to the peer.
++ const int rc = tx_msg.init_size (options.identity_size);
++ zmq_assert (rc == 0);
++ memcpy (tx_msg.data (), options.identity, options.identity_size);
++ encoder->load_msg (&tx_msg);
+ size_t buffer_size = encoder->encode (&bufferp, header_size);
+ zmq_assert (buffer_size == header_size);
+
+--
+1.8.4
+