summaryrefslogtreecommitdiff
path: root/src/modules/m_ident.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-26 01:43:09 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-26 01:43:09 +0000
commit939cb0ba987f927f1ad900d45f98ba6d8e03e9d4 (patch)
treef35510ff56e01ece2a0417c9a6fbad17fb7acfee /src/modules/m_ident.cpp
parentc8026bc2d73344e1df526f0a80694046efa4b22a (diff)
Clean up SocketEngine interface to allow edge-triggered I/O and sockets that do not force readability.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11760 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_ident.cpp')
-rw-r--r--src/modules/m_ident.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp
index 973c93f72..66bd8835a 100644
--- a/src/modules/m_ident.cpp
+++ b/src/modules/m_ident.cpp
@@ -127,21 +127,17 @@ class IdentRequestSocket : public EventHandler
}
/* Add fd to socket engine */
- if (!ServerInstance->SE->AddFd(this))
+ if (!ServerInstance->SE->AddFd(this, FD_WANT_NO_READ | FD_WANT_POLL_WRITE))
{
this->Close();
throw ModuleException("out of fds");
}
-
- /* Important: We set WantWrite immediately after connect()
- * because a successful connection will trigger a writability event
- */
- ServerInstance->SE->WantWrite(this);
}
virtual void OnConnected()
{
ServerInstance->Logs->Log("m_ident",DEBUG,"OnConnected()");
+ ServerInstance->SE->ChangeEventMask(this, FD_WANT_POLL_READ | FD_WANT_NO_WRITE);
char req[32];