File tree Expand file tree Collapse file tree 2 files changed +17
-18
lines changed
Expand file tree Collapse file tree 2 files changed +17
-18
lines changed Original file line number Diff line number Diff line change 1+ # Permission to Relicense under MPLv2
2+
3+ This is a statement by Thomas M. DuBuisson
4+ that grants permission to relicense its copyrights in the libzmq C++
5+ library (ZeroMQ) under the Mozilla Public License v2 (MPLv2).
6+
7+ A portion of the commits made by the Github handle "tommd", with
8+ commit author "Thomas M. DuBuisson", are copyright of Thomas M. DuBuisson.
9+ This document hereby grants the libzmq project team to relicense libzmq,
10+ including all past, present and future contributions of the author listed above.
11+
12+ Thomas M. DuBuisson
13+ 2019/04/11
Original file line number Diff line number Diff line change 3636#include " random.hpp"
3737#include " likely.hpp"
3838
39- extern " C" {
40- static void free_id (void *data_, void *hint_)
41- {
42- LIBZMQ_UNUSED (hint_);
43- free (data_);
44- }
45- }
46-
4739zmq::req_t::req_t (class ctx_t *parent_, uint32_t tid_, int sid_) :
4840 dealer_t (parent_, tid_, sid_),
4941 _receiving_reply (false ),
@@ -81,22 +73,16 @@ int zmq::req_t::xsend (msg_t *msg_)
8173 if (_request_id_frames_enabled) {
8274 _request_id++;
8375
84- // Copy request id before sending (see issue #1695 for details).
85- uint32_t *request_id_copy =
86- static_cast <uint32_t *> (malloc (sizeof (uint32_t )));
87- zmq_assert (request_id_copy);
88-
89- *request_id_copy = _request_id;
90-
9176 msg_t id;
92- int rc =
93- id.init_data (request_id_copy, sizeof (uint32_t ), free_id, NULL );
77+ int rc = id. init_size ( sizeof ( uint32_t ));
78+ memcpy ( id.data (), &_request_id, sizeof (uint32_t ));
9479 errno_assert (rc == 0 );
9580 id.set_flags (msg_t ::more);
9681
9782 rc = dealer_t::sendpipe (&id, &_reply_pipe);
98- if (rc != 0 )
83+ if (rc != 0 ) {
9984 return -1 ;
85+ }
10086 }
10187
10288 msg_t bottom;
You can’t perform that action at this time.
0 commit comments