summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-05 12:01:16 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-05 12:01:16 +0000
commitc82351d9b9c3133c761c3f1f62186e4e8020a6e9 (patch)
tree4dcf9df5faab4d87c4849665e451ff2a4d67242f
parenta8fe83a49938de5473f3e4f84e2a7b5f1c7e085a (diff)
Fix the 'not all ports could be bound' warning to not count server ports at this point
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5653 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/socket.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/socket.cpp b/src/socket.cpp
index 1e0762321..6d7fc45d6 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -403,7 +403,7 @@ int InspIRCd::BindPorts(bool bail, int &ports_found)
int InitialPortCount = stats->BoundPortCount;
this->Log(DEBUG,"Initial port count: %d",InitialPortCount);
- for (int count = 0; count < Config->ConfValueEnum(Config->config_data, "bind"); count++, ports_found++)
+ for (int count = 0; count < Config->ConfValueEnum(Config->config_data, "bind"); count++)
{
Config->ConfValue(Config->config_data, "bind", "port", count, configToken, MAXBUF);
Config->ConfValue(Config->config_data, "bind", "address", count, Addr, MAXBUF);
@@ -411,6 +411,7 @@ int InspIRCd::BindPorts(bool bail, int &ports_found)
if (((!*Type) || (!strcmp(Type,"clients"))) && (!HasPort(atoi(configToken),Addr)))
{
+ ports_found++;
// modules handle server bind types now
Config->ports[clientportcount+InitialPortCount] = atoi(configToken);
if (*Addr == '*')
@@ -462,7 +463,7 @@ int InspIRCd::BindPorts(bool bail, int &ports_found)
return InitialPortCount;
}
- for (int count = 0; count < Config->ConfValueEnum(Config->config_data, "bind"); count++, ports_found++)
+ for (int count = 0; count < Config->ConfValueEnum(Config->config_data, "bind"); count++)
{
Config->ConfValue(Config->config_data, "bind", "port", count, configToken, MAXBUF);
Config->ConfValue(Config->config_data, "bind", "address", count, Addr, MAXBUF);
@@ -470,6 +471,7 @@ int InspIRCd::BindPorts(bool bail, int &ports_found)
if ((!*Type) || (!strcmp(Type,"clients")))
{
+ ports_found++;
// modules handle server bind types now
Config->ports[clientportcount] = atoi(configToken);