summaryrefslogtreecommitdiff
path: root/net-libs/ignition-transport/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-01-31 20:30:04 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-01-31 20:30:04 +0000
commit4650985dd0e898b82e0d2ec225931297d4fadccf (patch)
treeeb0e8002cf3ebf1009110b6fec47fa90f873d824 /net-libs/ignition-transport/files
parent67f76a858f1ac826bd8a550d756d9ec6e340ed4f (diff)
gentoo resync : 31.01.2018
Diffstat (limited to 'net-libs/ignition-transport/files')
-rw-r--r--net-libs/ignition-transport/files/zmq.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/net-libs/ignition-transport/files/zmq.patch b/net-libs/ignition-transport/files/zmq.patch
new file mode 100644
index 000000000000..ddbf8f113064
--- /dev/null
+++ b/net-libs/ignition-transport/files/zmq.patch
@@ -0,0 +1,31 @@
+Index: ignition-transport4-4.0.0/src/NodeShared.cc
+===================================================================
+--- ignition-transport4-4.0.0.orig/src/NodeShared.cc
++++ ignition-transport4-4.0.0/src/NodeShared.cc
+@@ -92,7 +92,8 @@ bool userPass(std::string &_user, std::s
+ // Helper to send messages
+ int sendHelper(zmq::socket_t &_pub, const std::string &_data, int _type)
+ {
+- zmq::message_t msg(_data.data(), _data.size());
++ zmq::message_t msg(_data.size());
++ memcpy(msg.data(), _data.data(), _data.size());
+ return _pub.send(msg, _type);
+ }
+
+@@ -278,10 +279,13 @@ bool NodeShared::Publish(
+ {
+ // Create the messages.
+ // Note that we use zero copy for passing the message data (msg2).
+- zmq::message_t msg0(_topic.data(), _topic.size()),
+- msg1(this->myAddress.data(), this->myAddress.size()),
++ zmq::message_t msg0(_topic.size()),
++ msg1(this->myAddress.size()),
+ msg2(_data, _dataSize, _ffn, nullptr),
+- msg3(_msgType.data(), _msgType.size());
++ msg3(_msgType.size());
++ memcpy(msg0.data(), _topic.data(), _topic.size());
++ memcpy(msg1.data(), this->myAddress.data(), this->myAddress.size());
++ memcpy(msg3.data(), _msgType.data(), _msgType.size());
+
+ // Send the messages
+ std::lock_guard<std::recursive_mutex> lock(this->mutex);