mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-14 02:57:47 +01:00
Problem: Theoretical overflow when polling more than INT_MAX handles.
Solution: Always use fd_t when accessing the pollset.
This commit is contained in:
parent
7292de8de5
commit
8d8d32f4d0
@ -94,25 +94,25 @@ void zmq::poll_t::rm_fd (handle_t handle_)
|
||||
|
||||
void zmq::poll_t::set_pollin (handle_t handle_)
|
||||
{
|
||||
int index = fd_table [handle_].index;
|
||||
fd_t index = fd_table [handle_].index;
|
||||
pollset [index].events |= POLLIN;
|
||||
}
|
||||
|
||||
void zmq::poll_t::reset_pollin (handle_t handle_)
|
||||
{
|
||||
int index = fd_table [handle_].index;
|
||||
fd_t index = fd_table [handle_].index;
|
||||
pollset [index].events &= ~((short) POLLIN);
|
||||
}
|
||||
|
||||
void zmq::poll_t::set_pollout (handle_t handle_)
|
||||
{
|
||||
int index = fd_table [handle_].index;
|
||||
fd_t index = fd_table [handle_].index;
|
||||
pollset [index].events |= POLLOUT;
|
||||
}
|
||||
|
||||
void zmq::poll_t::reset_pollout (handle_t handle_)
|
||||
{
|
||||
int index = fd_table [handle_].index;
|
||||
fd_t index = fd_table [handle_].index;
|
||||
pollset [index].events &= ~((short) POLLOUT);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user