mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-29 12:18:04 +01:00
Problem: ZMQ_PRE_ALLOCATED_FD is too long
Solution: rename socket option (and variables and files) from pre_allocated_fd to usefd.
This commit is contained in:
@@ -78,7 +78,7 @@ zmq::options_t::options_t () :
|
||||
heartbeat_ttl (0),
|
||||
heartbeat_interval (0),
|
||||
heartbeat_timeout (-1),
|
||||
pre_allocated_fd (-1)
|
||||
usefd (-1)
|
||||
{
|
||||
#if defined ZMQ_HAVE_VMCI
|
||||
vmci_buffer_size = 0;
|
||||
@@ -623,9 +623,9 @@ int zmq::options_t::setsockopt (int option_, const void *optval_,
|
||||
break;
|
||||
# endif
|
||||
|
||||
case ZMQ_PRE_ALLOCATED_FD:
|
||||
case ZMQ_USEFD:
|
||||
if (is_int && value >= -1) {
|
||||
pre_allocated_fd = value;
|
||||
usefd = value;
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
@@ -1040,9 +1040,9 @@ int zmq::options_t::getsockopt (int option_, void *optval_, size_t *optvallen_)
|
||||
}
|
||||
break;
|
||||
|
||||
case ZMQ_PRE_ALLOCATED_FD:
|
||||
case ZMQ_USEFD:
|
||||
if (is_int) {
|
||||
*value = pre_allocated_fd;
|
||||
*value = usefd;
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user