0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-27 07:31:03 +08:00

Problem: extra blob copy

Solution: use reference tag
This commit is contained in:
Gudmundur Adalsteinsson 2020-05-01 22:27:44 +00:00
parent e05fe370fe
commit 47a080aac0

View File

@ -434,7 +434,7 @@ int zmq::router_t::get_peer_state (const void *routing_id_,
// TODO remove the const_cast, see comment in lookup_out_pipe // TODO remove the const_cast, see comment in lookup_out_pipe
const blob_t routing_id_blob ( const blob_t routing_id_blob (
static_cast<unsigned char *> (const_cast<void *> (routing_id_)), static_cast<unsigned char *> (const_cast<void *> (routing_id_)),
routing_id_size_); routing_id_size_, reference_tag_t ());
const out_pipe_t *out_pipe = lookup_out_pipe (routing_id_blob); const out_pipe_t *out_pipe = lookup_out_pipe (routing_id_blob);
if (!out_pipe) { if (!out_pipe) {
errno = EHOSTUNREACH; errno = EHOSTUNREACH;