From c82351d9b9c3133c761c3f1f62186e4e8020a6e9 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 5 Nov 2006 12:01:16 +0000 Subject: 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 --- src/socket.cpp | 6 ++++-- 1 file 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); -- cgit v1.2.3