summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-16 09:30:53 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-16 09:30:53 +0000
commit7cf8d9c1c8ba68419d282e715b7fc3575987a6f2 (patch)
tree66e1aa3c524c25ba69da052511fb297697b6f07a
parentc1d266269619fb84f3c08b153227ec819b6fc82a (diff)
Moved BoundPortCount into serverstats
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2504 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--include/inspircd.h2
-rw-r--r--src/inspircd.cpp5
2 files changed, 4 insertions, 3 deletions
diff --git a/include/inspircd.h b/include/inspircd.h
index 11f93b574..ad95d859e 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -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;
}
};
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index b564ec396..e532add12 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -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);