summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-09 15:36:51 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-09 15:36:51 +0000
commit89749a74402913d50bd5a9140757a383d6ff175e (patch)
tree99a06946f8959356374a5aea9d5ae39f70c653cd /src/inspircd.cpp
parentd50dddbb92036893b9188a5df9991a0d5eb80e03 (diff)
Move fd_ref_table into class InspIRCd*
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4817 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp24
1 files changed, 4 insertions, 20 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 242183303..e272d4c6e 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -82,10 +82,6 @@ socklen_t length;
time_t TIME = time(NULL), OLDTIME = time(NULL);
-// This table references users by file descriptor.
-// its an array to make it VERY fast, as all lookups are referenced
-// by an integer, meaning there is no need for a scan/search operation.
-userrec* fd_ref_table[MAX_DESCRIPTORS];
Server* MyServer = new Server;
user_hash clientlist;
chan_hash chanlist;
@@ -708,18 +704,6 @@ void InspIRCd::DoOneIteration(bool process_module_sockets)
expire_lines();
if (process_module_sockets)
{
- /* Fix by brain - the addition of DoOneIteration means that this
- * can end up getting called recursively in the following pattern:
- *
- * m_spanningtree DoPingChecks
- * (server pings out and is squit)
- * (squit causes call to DoOneIteration)
- * DoOneIteration enters here
- * calls DoBackground timer
- * enters m_spanningtree DoPingChecks... see step 1.
- *
- * This should do the job and fix the bug.
- */
FOREACH_MOD(I_OnBackgroundTimer,OnBackgroundTimer(TIME));
}
TickMissedTimers(TIME);
@@ -734,7 +718,7 @@ void InspIRCd::DoOneIteration(bool process_module_sockets)
if (iterations++ == 15)
{
iterations = 0;
- DoBackgroundUserStuff(TIME);
+ this->DoBackgroundUserStuff(TIME);
}
/* Once a second, do the background processing */
@@ -754,7 +738,7 @@ void InspIRCd::DoOneIteration(bool process_module_sockets)
* hit at all.
*/
if (process_module_sockets)
- DoSocketTimeouts(TIME,this);
+ this->DoSocketTimeouts(TIME);
TickTimers(TIME);
@@ -783,9 +767,9 @@ void InspIRCd::DoOneIteration(bool process_module_sockets)
case X_ESTAB_CLIENT:
log(DEBUG,"Type: X_ESTAB_CLIENT: fd=%d",activefds[activefd]);
- cu = fd_ref_table[activefds[activefd]];
+ cu = this->fd_ref_table[activefds[activefd]];
if (cu)
- ProcessUser(cu);
+ this->ProcessUser(cu);
break;