From 9af16151afe9e30f95b34190baab1121f9e1cad1 Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 14 Dec 2005 18:10:09 +0000 Subject: Fixed a bad extern (bad extern, BAD) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2435 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd_io.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/inspircd_io.cpp b/src/inspircd_io.cpp index a033f0df6..062b45eb6 100644 --- a/src/inspircd_io.cpp +++ b/src/inspircd_io.cpp @@ -33,7 +33,6 @@ using namespace std; #include "xline.h" extern ServerConfig *Config; -extern int boundPortCount; extern int openSockfd[MAXSOCKS]; extern time_t TIME; @@ -1029,6 +1028,7 @@ int BindPorts() char configToken[MAXBUF], Addr[MAXBUF], Type[MAXBUF]; sockaddr_in client,server; int clientportcount = 0; + int BoundPortCount; for (int count = 0; count < Config->ConfValueEnum("bind",&Config->config_f); count++) { Config->ConfValue("bind","port",count,configToken,&Config->config_f); @@ -1048,29 +1048,29 @@ int BindPorts() for (int count = 0; count < PortCount; count++) { - if ((openSockfd[boundPortCount] = OpenTCPSocket()) == ERROR) + if ((openSockfd[BoundPortCount] = OpenTCPSocket()) == ERROR) { - log(DEBUG,"InspIRCd: startup: bad fd %lu",(unsigned long)openSockfd[boundPortCount]); + log(DEBUG,"InspIRCd: startup: bad fd %lu",(unsigned long)openSockfd[BoundPortCount]); return(ERROR); } - if (BindSocket(openSockfd[boundPortCount],client,server,Config->ports[count],Config->addrs[count]) == ERROR) + if (BindSocket(openSockfd[BoundPortCount],client,server,Config->ports[count],Config->addrs[count]) == ERROR) { log(DEFAULT,"InspIRCd: startup: failed to bind port %lu",(unsigned long)Config->ports[count]); } else /* well we at least bound to one socket so we'll continue */ { - boundPortCount++; + BoundPortCount++; } } /* if we didn't bind to anything then abort */ - if (!boundPortCount) + if (!BoundPortCount) { log(DEFAULT,"InspIRCd: startup: no ports bound, bailing!"); printf("\nERROR: Was not able to bind any of %lu ports! Please check your configuration.\n\n", (unsigned long)PortCount); return (ERROR); } - return boundPortCount; + return BoundPortCount; } -- cgit v1.2.3