Could it really be THIS simple?

git-svn-id: http://svn.inspircd.org/repository/branches/1_1_stable@8282 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
brain 2007-10-21 20:43:12 +00:00
parent 5acf4eb889
commit 0e576a2bdb
2 changed files with 7 additions and 1 deletions

View File

@ -116,6 +116,8 @@ class IdentRequestSocket : public EventHandler
}
ServerInstance->SE->WantWrite(this);
/* XXX Writeable socket, readable close? what happens?! */
/*Close();*/
}
virtual void OnConnected()
@ -350,7 +352,7 @@ class ModuleIdent : public Module
ServerInstance->Log(DEBUG, "Has ident_socket");
if (isock->age + RequestTimeout > ServerInstance->Time() && !isock->HasResult())
if ((ServerInstance->Time() > (isock->age + RequestTimeout)) && !isock->HasResult())
{
/* Ident timeout */
user->WriteServ("NOTICE Auth :*** Ident request timed out.");

View File

@ -74,6 +74,7 @@ void EPollEngine::WantWrite(EventHandler* eh)
ev.events = EPOLLOUT;
ev.data.fd = eh->GetFd();
epoll_ctl(EngineHandle, EPOLL_CTL_MOD, eh->GetFd(), &ev);
ServerInstance->Log(DEBUG,"WantWrite on fd %d", eh->GetFd());
}
bool EPollEngine::DelFd(EventHandler* eh, bool force)
@ -89,7 +90,10 @@ bool EPollEngine::DelFd(EventHandler* eh, bool force)
int i = epoll_ctl(EngineHandle, EPOLL_CTL_DEL, fd, &ev);
if (i < 0 && !force)
{
ServerInstance->Log(DEBUG,"Unable to remove fd: operating system error: %s", strerror(errno));
return false;
}
CurrentSetSize--;
ref[fd] = NULL;