Commit 8d8d32f4 authored by Michael Lutz's avatar Michael Lutz

Problem: Theoretical overflow when polling more than INT_MAX handles.

Solution: Always use fd_t when accessing the pollset.
parent 7292de8d
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment