-void TreeSocket::OnError(BufferedSocketError e)
-{
- Link* MyLink;
-
- switch (e)
- {
- case I_ERR_CONNECT:
- ServerInstance->SNO->WriteToSnoMask('l', "Connection failed: Connection to \002%s\002 refused", myhost.c_str());
- MyLink = Utils->FindLink(myhost);
- if (MyLink)
- Utils->DoFailOver(MyLink);
- break;
- case I_ERR_SOCKET:
- ServerInstance->SNO->WriteToSnoMask('l', "Connection failed: Could not create socket (%s)", strerror(errno));
- break;
- case I_ERR_BIND:
- ServerInstance->SNO->WriteToSnoMask('l', "Connection failed: Error binding socket to address or port (%s)", strerror(errno));
- break;
- case I_ERR_WRITE:
- ServerInstance->SNO->WriteToSnoMask('l', "Connection failed: I/O error on connection (%s)", errno ? strerror(errno) : "Connection closed unexpectedly");
- break;
- case I_ERR_NOMOREFDS:
- ServerInstance->SNO->WriteToSnoMask('l', "Connection failed: Operating system is out of file descriptors!");
- break;
- default:
- if ((errno) && (errno != EINPROGRESS) && (errno != EAGAIN))
- ServerInstance->SNO->WriteToSnoMask('l', "Connection to \002%s\002 failed with OS error: %s", myhost.c_str(), strerror(errno));
- break;
+ ServerInstance->SNO->WriteGlobalSno('l', "Connection to \2%s\2[%s] started.", linkID.c_str(),
+ (capab->link->HiddenFromStats ? "<hidden>" : capab->link->IPAddr.c_str()));
+ this->SendCapabilities(1);