]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix the 'not all ports could be bound' warning to not count server ports at this...
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 5 Nov 2006 12:01:16 +0000 (12:01 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 5 Nov 2006 12:01:16 +0000 (12:01 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5653 e03df62e-2008-0410-955e-edbf42e46eb7

src/socket.cpp

index 1e0762321b24a68fbbe07a75bcbaad1f45c77168..6d7fc45d6108be4deb84f0b3683d1e6da2df86d4 100644 (file)
@@ -403,7 +403,7 @@ int InspIRCd::BindPorts(bool bail, int &ports_found)
                int InitialPortCount = stats->BoundPortCount;
                this->Log(DEBUG,"Initial port count: %d",InitialPortCount);
 
                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);
                {
                        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)))
                        {
 
                        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 == '*')
                                // 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;
        }
 
                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);
        {
                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")))
                {
 
                if ((!*Type) || (!strcmp(Type,"clients")))
                {
+                       ports_found++;
                        // modules handle server bind types now
                        Config->ports[clientportcount] = atoi(configToken);
 
                        // modules handle server bind types now
                        Config->ports[clientportcount] = atoi(configToken);