]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Moved BoundPortCount into serverstats
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 16 Dec 2005 09:30:53 +0000 (09:30 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 16 Dec 2005 09:30:53 +0000 (09:30 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2504 e03df62e-2008-0410-955e-edbf42e46eb7

include/inspircd.h
src/inspircd.cpp

index 11f93b5741427a23af8baff0aa637eb536771f70..ad95d859eba2a3a85a8af1d4463c58c6a8a65f2b 100644 (file)
@@ -81,12 +81,14 @@ class serverstats
        int statsConnects;
        int statsSent;
        int statsRecv;
+       int BoundPortCount;
 
        serverstats()
        {
                statsAccept = statsRefused = statsUnknown = 0;
                statsCollisions = statsDns = statsDnsGood = 0;
                statsDnsBad = statsConnects = statsSent = statsRecv = 0;
+               BoundPortCount = 0;
        }
 };
 
index b564ec3968308d4dc385d756c4f1671f705417ed..e532add1206c95060228f464f1ed4d2d4f37cffc 100644 (file)
@@ -97,7 +97,6 @@ chan_hash chanlist;
 whowas_hash whowas;
 command_table cmdlist;
 servernamelist servernames;
-int BoundPortCount = 0;
 char lowermap[255];
 
 void AddServerName(std::string servername)
@@ -354,7 +353,7 @@ InspIRCd::InspIRCd(int argc, char** argv)
         SetupCommandTable();
         AddServerName(Config->ServerName);
         CheckDie();
-        BoundPortCount = BindPorts();
+        stats->BoundPortCount = BindPorts();
 
         printf("\n");
         if (!Config->nofork)
@@ -1066,7 +1065,7 @@ int InspIRCd::Run()
        /* Add the listening sockets used for client inbound connections
         * to the socket engine
         */
-       for (int count = 0; count < BoundPortCount; count++)
+       for (int count = 0; count < stats->BoundPortCount; count++)
                SE->AddFd(openSockfd[count],true,X_LISTEN);
 
        WritePID(Config->PID);