aboutsummaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
authorGravatar brain2006-08-07 21:25:48 +0000
committerGravatar brain2006-08-07 21:25:48 +0000
commit358f2064c432e1e3ef153adeb5aed0fa2e35efde (patch)
tree721353c3c77d93f15bbd9d6fd80df2761b4b6117 /src/inspircd.cpp
parentPut casts back :( (diff)
Bail if we couldn't bind any ports (when did this get broken?)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4774 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index cd5f74a0a..c31dbae50 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -917,7 +917,13 @@ int InspIRCd::Run()
this->BuildISupport();
printf("\nInspIRCd is now running!\n");
-
+
+ if (!stats->BoundPortCount)
+ {
+ printf("\nI couldn't bind any ports! Are you sure you didn't start InspIRCd twice?\n");
+ Exit(ERROR);
+ }
+
if (!Config->nofork)
{
fclose(stdout);
@@ -928,8 +934,12 @@ int InspIRCd::Run()
/* Add the listening sockets used for client inbound connections
* to the socket engine
*/
+ log(DEBUG,"%d listeners",stats->BoundPortCount);
for (unsigned long count = 0; count < stats->BoundPortCount; count++)
+ {
+ log(DEBUG,"Add listener: %d",Config->openSockfd[count]);
SE->AddFd(Config->openSockfd[count],true,X_LISTEN);
+ }
this->WritePID(Config->PID);