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];
+ 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
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->openSockfd[j]->SetDescription("plaintext");
+ if (ServerInstance->Config->openSockfd[j])
+ ServerInstance->Config->openSockfd[j]->SetDescription("plaintext");
}
}
}