Skip to content

Commit

Permalink
Dont worry this is only comments, not worth rebuilding for
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5613 e03df62e-2008-0410-955e-edbf42e46eb7
  • Loading branch information
braindigitalis committed Oct 31, 2006
1 parent 53707ca commit be69cdf
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/socketengine_kqueue.cpp
Expand Up @@ -145,12 +145,19 @@ int KQueueEngine::DispatchEvents()
if (ke_list[j].flags & EV_EOF)
{
ServerInstance->Log(DEBUG,"kqueue: Error on FD %d", ke_list[j].ident);
/* Sneaky tricksy hobitses! */
/* We love you kqueue, oh yes we do *sings*!
* kqueue gives us the error number directly in the EOF state!
* Unlike smelly epoll and select, where we have to getsockopt
* to get the error, this saves us time and cpu cycles. Go BSD!
*/
ref[ke_list[j].ident]->HandleEvent(EVENT_ERROR, ke_list[j].fflags);
continue;
}
if (ke_list[j].flags & EVFILT_WRITE)
{
/* This looks wrong but its right. As above, theres no modify
* call in kqueue. See the manpage.
*/
struct kevent ke;
EV_SET(&ke, ke_list[j].ident, EVFILT_READ, EV_ADD, 0, 0, NULL);
int i = kevent(EngineHandle, &ke, 1, 0, 0, NULL);
Expand Down

0 comments on commit be69cdf

Please sign in to comment.