bool InspSocket::Poll()
{
-#ifdef WINDOWS
- if(Instance->SE->GetRef(this->fd) != this)
- return false;
int incoming = -1;
-#else
- if (this->Instance->SE->GetRef(this->fd) != this)
- return false;
- int incoming = -1;
-
- if ((fd < 0) || (fd > MAX_DESCRIPTORS))
+#ifndef WINDOWS
+ if (!Instance->SE->BoundsCheckFd(this))
return false;
#endif
+
+ if (Instance->SE->GetRef(this->fd) != this)
+ return false;
+
switch (this->state)
{
case I_CONNECTING:
if (this->fd > -1)
{
this->Instance->SE->DelFd(this);
- this->SetState(I_CONNECTED);
if (!this->Instance->SE->AddFd(this))
return false;
}
-#else
- this->SetState(I_CONNECTED);
#endif
- Instance->Log(DEBUG,"Inspsocket I_CONNECTING state");
+ this->SetState(I_CONNECTED);
+
if (Instance->Config->GetIOHook(this))
{
Instance->Log(DEBUG,"Hook for raw connect");
void userrec::FullConnect()
{
- ServerInstance->Log(DEBUG,"FullConnect");
ServerInstance->stats->statsConnects++;
this->idle_lastmsg = ServerInstance->Time();
FOREACH_MOD(I_OnPostConnect,OnPostConnect(this));
ServerInstance->SNO->WriteToSnoMask('c',"Client connecting on port %d: %s!%s@%s [%s] [%s]", this->GetPort(), this->nick, this->ident, this->host, this->GetIPString(), this->fullname);
-
- ServerInstance->Log(DEBUG,"Exit FullConnect");
}
/** userrec::UpdateNick()