diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-06-02 21:44:23 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-06-02 21:44:23 +0000 |
commit | a6777f928c4151269eedc30ce6cbfb28e44ad025 (patch) | |
tree | 3eac4f31a0495c34938df74efafec9f0e3d5e43b /src | |
parent | 2f350cc665025a5b6b5fa52242be9c3b623567f9 (diff) |
More vincent tweaks
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1593 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/servers.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/servers.cpp b/src/servers.cpp index b66546f42..bb652f77b 100644 --- a/src/servers.cpp +++ b/src/servers.cpp @@ -476,36 +476,36 @@ bool serverrec::RecvPacket(std::deque<std::string> &messages, char* recvhost,std if (rcvsize == 0) { log(DEBUG,"recv() failed for serverrec::RecvPacket(): EOF"); - log(DEBUG,"Disabling connector: %s",this->connectors[i].GetServerName().c_str()); + std::string sn = this->connectors[i].GetServerName(); + log(DEBUG,"Disabling connector: %s",sn.c_str()); this->connectors[i].SetState(STATE_DISCONNECTED); - if (!IsRoutable(this->connectors[i].GetServerName())) + if (!IsRoutable(sn)) { - WriteOpers("*** Server %s is no longer routable, disconnecting (EOF)",this->connectors[i].GetServerName().c_str()); - snprintf(buffer,MAXBUF,"& %s",this->connectors[i].GetServerName().c_str()); - NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer); - DoSplit(this->connectors[i].GetServerName().c_str()); + WriteOpers("*** Server %s is no longer routable, disconnecting (EOF)",sn.c_str()); + snprintf(buffer,MAXBUF,"& %s",sn.c_str()); + NetSendToAllExcept(sn.c_str(),buffer); + DoSplit(sn.c_str()); } this->connectors[i].CloseConnection(); has_been_netsplit = true; - break; } if (rcvsize == -1) { if (errno != EAGAIN) { log(DEBUG,"recv() failed for serverrec::RecvPacket(): %s",strerror(errno)); - log(DEBUG,"Disabling connector: %s",this->connectors[i].GetServerName().c_str()); + std::string sn = this->connectors[i].GetServerName(); + log(DEBUG,"Disabling connector: %s",sn.c_str()); this->connectors[i].SetState(STATE_DISCONNECTED); - if (!IsRoutable(this->connectors[i].GetServerName())) + if (!IsRoutable(sn)) { - WriteOpers("*** Server %s is no longer routable, disconnecting.",this->connectors[i].GetServerName().c_str()); - snprintf(buffer,MAXBUF,"& %s",this->connectors[i].GetServerName().c_str()); - NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer); - DoSplit(this->connectors[i].GetServerName().c_str()); + WriteOpers("*** Server %s is no longer routable, disconnecting.",sn.c_str()); + snprintf(buffer,MAXBUF,"& %s",sn.c_str()); + NetSendToAllExcept(sn.c_str(),buffer); + DoSplit(sn.c_str()); } has_been_netsplit = true; this->connectors[i].CloseConnection(); - break; } } int pushed = 0; @@ -513,18 +513,18 @@ bool serverrec::RecvPacket(std::deque<std::string> &messages, char* recvhost,std { if (!this->connectors[i].AddBuffer(data)) { - WriteOpers("*** Read buffer for %s exceeds maximum, closing connection!",this->connectors[i].GetServerName().c_str()); + std::string sn = this->connectors[i].GetServerName(); + WriteOpers("*** Read buffer for %s exceeds maximum, closing connection!",sn.c_str()); this->connectors[i].SetState(STATE_DISCONNECTED); - if (!IsRoutable(this->connectors[i].GetServerName())) + if (!IsRoutable(sn)) { - WriteOpers("*** Server %s is no longer routable, disconnecting.",this->connectors[i].GetServerName().c_str()); - snprintf(buffer,MAXBUF,"& %s",this->connectors[i].GetServerName().c_str()); - NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer); - DoSplit(this->connectors[i].GetServerName().c_str()); + WriteOpers("*** Server %s is no longer routable, disconnecting.",sn.c_str()); + snprintf(buffer,MAXBUF,"& %s",sn.c_str()); + NetSendToAllExcept(sn.c_str(),buffer); + DoSplit(sn.c_str()); } has_been_netsplit = true; this->connectors[i].CloseConnection(); - break; } if (this->connectors[i].BufferIsComplete()) { |