mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 02:59:01 -04:00
Merge pull request #135 from nenolod/bugfix/epoll-nitpicks
[2.1] epoll: make sure EPOLLET flag does not get clobbered
This commit is contained in:
commit
b25e26f38e
@ -89,9 +89,9 @@ EPollEngine::~EPollEngine()
|
||||
delete[] events;
|
||||
}
|
||||
|
||||
static int mask_to_epoll(int event_mask)
|
||||
static unsigned mask_to_epoll(int event_mask)
|
||||
{
|
||||
int rv = 0;
|
||||
unsigned rv = 0;
|
||||
if (event_mask & (FD_WANT_POLL_READ | FD_WANT_POLL_WRITE | FD_WANT_SINGLE_WRITE))
|
||||
{
|
||||
// we need to use standard polling on this FD
|
||||
@ -148,8 +148,8 @@ bool EPollEngine::AddFd(EventHandler* eh, int event_mask)
|
||||
|
||||
void EPollEngine::OnSetEvent(EventHandler* eh, int old_mask, int new_mask)
|
||||
{
|
||||
int old_events = mask_to_epoll(old_mask);
|
||||
int new_events = mask_to_epoll(new_mask);
|
||||
unsigned old_events = mask_to_epoll(old_mask);
|
||||
unsigned new_events = mask_to_epoll(new_mask);
|
||||
if (old_events != new_events)
|
||||
{
|
||||
// ok, we actually have something to tell the kernel about
|
||||
|
Loading…
x
Reference in New Issue
Block a user