summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-07-27 18:11:03 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-07-27 18:11:03 +0000
commitd59b89205e09270d51f303b86ec6d71f36087a79 (patch)
tree6fb00edfb24272ce4c4af8adc5ccd3c1b17c39f7
parentf017306e4ef286059a1a63059309355b4b4bca77 (diff)
Tidyups, remove of ifdefs
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7597 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/inspsocket.cpp21
-rw-r--r--src/users.cpp3
2 files changed, 8 insertions, 16 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp
index 1de46e316..c0a77a28d 100644
--- a/src/inspsocket.cpp
+++ b/src/inspsocket.cpp
@@ -552,19 +552,16 @@ void SocketTimeout::Tick(time_t now)
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:
@@ -575,14 +572,12 @@ bool InspSocket::Poll()
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");
diff --git a/src/users.cpp b/src/users.cpp
index 97e2291be..cc01c3480 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -1036,7 +1036,6 @@ void userrec::CheckClass()
void userrec::FullConnect()
{
- ServerInstance->Log(DEBUG,"FullConnect");
ServerInstance->stats->statsConnects++;
this->idle_lastmsg = ServerInstance->Time();
@@ -1117,8 +1116,6 @@ void userrec::FullConnect()
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()