diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-05-24 12:32:11 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-05-24 12:32:11 +0000 |
commit | cd89ac3c98e1b56f21215eec11fff386166b3d69 (patch) | |
tree | 4c238d74582030dd8d271417fc8894c6df5c63d3 /src | |
parent | 6ac0b8647f9b70d86b39f8e60f0d7a5efbb15826 (diff) |
Fixed inbound server errors
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1491 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/commands.cpp | 6 | ||||
-rw-r--r-- | src/connection.cpp | 2 | ||||
-rw-r--r-- | src/servers.cpp | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/src/commands.cpp b/src/commands.cpp index 929a84f38..8684cbe06 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -3288,6 +3288,7 @@ void handle_link_packet(char* tcp_msg, char* tcp_host, serverrec *serv,char* tcp char buffer[MAXBUF]; snprintf(buffer,MAXBUF,"E :Server %s already exists!",servername); serv->SendPacket(buffer,tcp_host); + serv->FlushWriteBuffers(); RemoveServer(tcp_host); return; } @@ -3298,6 +3299,7 @@ void handle_link_packet(char* tcp_msg, char* tcp_host, serverrec *serv,char* tcp char buffer[MAXBUF]; snprintf(buffer,MAXBUF,"E :Version number mismatch"); serv->SendPacket(buffer,tcp_host); + serv->FlushWriteBuffers(); RemoveServer(tcp_host); RemoveServer(servername); return; @@ -3352,6 +3354,7 @@ void handle_link_packet(char* tcp_msg, char* tcp_host, serverrec *serv,char* tcp char buffer[MAXBUF]; snprintf(buffer,MAXBUF,"E :Access is denied (no matching link block)"); serv->SendPacket(buffer,tcp_host); + serv->FlushWriteBuffers(); WriteOpers("CONNECT from %s denied, no matching link block",servername); RemoveServer(tcp_host); RemoveServer(servername); @@ -3425,6 +3428,7 @@ void handle_link_packet(char* tcp_msg, char* tcp_host, serverrec *serv,char* tcp char buffer[MAXBUF]; snprintf(buffer,MAXBUF,"E :Access is denied (no matching link block)"); serv->SendPacket(buffer,tcp_host); + serv->FlushWriteBuffers(); WriteOpers("CONNECT from %s denied, no matching link block",servername); RemoveServer(tcp_host); RemoveServer(servername); @@ -3463,6 +3467,7 @@ void handle_link_packet(char* tcp_msg, char* tcp_host, serverrec *serv,char* tcp char buffer[MAXBUF]; snprintf(buffer,MAXBUF,"E :Access is denied (Server exists in the mesh)"); serv->SendPacket(buffer,tcp_host); + serv->FlushWriteBuffers(); WriteOpers("CONNECT from %s denied, \"%s\" already exists!",tcp_host,servername); RemoveServer(tcp_host); return; @@ -3523,6 +3528,7 @@ void handle_link_packet(char* tcp_msg, char* tcp_host, serverrec *serv,char* tcp char buffer[MAXBUF]; snprintf(buffer,MAXBUF,"E :Access is denied (no matching link block)"); serv->SendPacket(buffer,tcp_host); + serv->FlushWriteBuffers(); WriteOpers("CONNECT from %s denied, no matching link block",servername); RemoveServer(tcp_host); RemoveServer(servername); diff --git a/src/connection.cpp b/src/connection.cpp index 31080615d..7e54e4297 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -228,6 +228,8 @@ bool ircd_connector::FlushWriteBuf() int ret = poll(&polls,1,1); if (ret < 1) return true; + // this falls through and sends any waiting data, which can put it into the + // connected state. } if (sendq.length()) { diff --git a/src/servers.cpp b/src/servers.cpp index 0e47ecfba..d22ad760f 100644 --- a/src/servers.cpp +++ b/src/servers.cpp @@ -193,7 +193,6 @@ bool serverrec::MeshCookie(char* targethost, int newport, unsigned long cookie, snprintf(connect,MAXBUF,"- %lu %s :%s",cookie,getservername().c_str(),getserverdesc().c_str()); connector.SetState(STATE_NOAUTH_OUTBOUND); connector.SetHostAndPort(targethost, newport); - connector.SetState(STATE_CONNECTED); this->connectors.push_back(connector); return this->SendPacket(connect, servername); } |