git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6230
e03df62e-2008-0410-955e-
edbf42e46eb7
int MyModCount = this->GetModuleCount();
for (unsigned int i = 0; i < stats->BoundPortCount; i++)
int MyModCount = this->GetModuleCount();
for (unsigned int i = 0; i < stats->BoundPortCount; i++)
/* This calls the constructor and closes the listening socket */
delete Config->openSockfd[i];
/* This calls the constructor and closes the listening socket */
delete Config->openSockfd[i];
+ Config->openSockfd[i] = NULL;
+ }
+ stats->BoundPortCount = 0;
/* We do this more than once, so that any service providers get a
* chance to be unhooked by the modules using them, but then get
/* We do this more than once, so that any service providers get a
* chance to be unhooked by the modules using them, but then get
ServerInstance->Config->DelIOHook(listenports[i]);
for (unsigned int j = 0; j < ServerInstance->stats->BoundPortCount; j++)
if (ServerInstance->Config->ports[j] == listenports[i])
ServerInstance->Config->DelIOHook(listenports[i]);
for (unsigned int j = 0; j < ServerInstance->stats->BoundPortCount; j++)
if (ServerInstance->Config->ports[j] == listenports[i])
- ServerInstance->Config->openSockfd[j]->SetDescription("plaintext");
+ if (ServerInstance->Config->openSockfd[j])
+ ServerInstance->Config->openSockfd[j]->SetDescription("plaintext");
ServerInstance->Config->DelIOHook(listenports[i]);
for (unsigned int j = 0; j < ServerInstance->stats->BoundPortCount; j++)
if (ServerInstance->Config->ports[j] == listenports[i])
ServerInstance->Config->DelIOHook(listenports[i]);
for (unsigned int j = 0; j < ServerInstance->stats->BoundPortCount; j++)
if (ServerInstance->Config->ports[j] == listenports[i])
- ServerInstance->Config->openSockfd[j]->SetDescription("plaintext");
+ if (ServerInstance->Config->openSockfd[j])
+ ServerInstance->Config->openSockfd[j]->SetDescription("plaintext");