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:
Luca Boccassi
2016-02-08 22:40:20 +00:00
parent 66d9a5f5ae
commit c158178798
13 changed files with 35 additions and 35 deletions

View File

@@ -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;