summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-07-27 17:20:41 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-07-27 17:20:41 +0000
commit156c232d1d22568d20ec498c4bd344bf03052e4a (patch)
tree8ed920712146b182ef5c95604a597a808ca604a6
parentf3624af468d769f0cb05cf17cd18111f5faa9ec3 (diff)
Found the bug, turns out i just introduced it with the last commit :p
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7591 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/inspsocket.cpp8
-rw-r--r--src/userprocess.cpp4
-rw-r--r--src/users.cpp5
3 files changed, 7 insertions, 10 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp
index 3eddb6f62..1de46e316 100644
--- a/src/inspsocket.cpp
+++ b/src/inspsocket.cpp
@@ -378,13 +378,7 @@ std::string InspSocket::GetIP()
char* InspSocket::Read()
{
- if (Instance->SE->BoundsCheckFd(this))
- return NULL;
-#ifdef WINDOWS
- if ((fd < 0) || (m_internalFd > MAX_DESCRIPTORS))
-#else
- if ((fd < 0) || (fd > MAX_DESCRIPTORS))
-#endif
+ if (!Instance->SE->BoundsCheckFd(this))
return NULL;
int n = 0;
diff --git a/src/userprocess.cpp b/src/userprocess.cpp
index 818713f89..78a0bc31f 100644
--- a/src/userprocess.cpp
+++ b/src/userprocess.cpp
@@ -195,8 +195,7 @@ void InspIRCd::DoBackgroundUserStuff(time_t TIME)
const time_t DUMMY_VALUE = 32768;
next_call = TIME + DUMMY_VALUE;
- /* XXX: IT IS NOT SAFE TO USE AN ITERATOR HERE. DON'T EVEN THINK ABOUT IT. */
- for (std::vector<userrec*>::iterator count2 = local_users.begin(); count2 != local_users.end(); ++count2)
+ for (std::vector<userrec*>::iterator count2 = local_users.begin(); count2 != local_users.end(); count2++)
{
userrec* curr = *count2;
@@ -284,3 +283,4 @@ void InspIRCd::DoBackgroundUserStuff(time_t TIME)
}
}
}
+
diff --git a/src/users.cpp b/src/users.cpp
index efaffd2dd..97e2291be 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -1036,6 +1036,7 @@ void userrec::CheckClass()
void userrec::FullConnect()
{
+ ServerInstance->Log(DEBUG,"FullConnect");
ServerInstance->stats->statsConnects++;
this->idle_lastmsg = ServerInstance->Time();
@@ -1116,6 +1117,8 @@ 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()
@@ -1354,7 +1357,7 @@ const char* userrec::GetIPString(char* buf)
*/
void userrec::Write(std::string text)
{
- if (ServerInstance->SE->BoundsCheckFd(this))
+ if (!ServerInstance->SE->BoundsCheckFd(this))
return;
try