]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Tidyups, remove of ifdefs
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 27 Jul 2007 18:11:03 +0000 (18:11 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 27 Jul 2007 18:11:03 +0000 (18:11 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7597 e03df62e-2008-0410-955e-edbf42e46eb7

src/inspsocket.cpp
src/users.cpp

index 1de46e31684213f63e4c0e119837adf56c0663ab..c0a77a28ddbf4bde85ecc7b212510bf0569106b7 100644 (file)
@@ -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");
index 97e2291be906a4a220e47ab72d20fd8f94573e8a..cc01c3480d5b206782d68a572e19ea82c5964e97 100644 (file)
@@ -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()