From bfa2c221e3e87d4d15fddc64467256019761d940 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 28 Apr 2005 00:58:34 +0000 Subject: [PATCH] A-bug-huntin' we will go git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1231 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/connection.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/connection.cpp b/src/connection.cpp index ec2d3c507..335a258a8 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -410,16 +410,19 @@ bool connection::SendPacket(char *message, const char* sendhost) if (cn->GetState() == STATE_DISCONNECTED) { - log(DEBUG,"Main route to %s is down, seeking alternative",sendhost); + log(DEBUG,"\n\n\n\nMain route to %s is down, seeking alternative\n\n\n\n",sendhost); // fix: can only route one hop to avoid a loop if (strncmp(message,"R ",2)) { + log(DEBUG,"Not a double reroute"); // this route is down, we must re-route the packet through an available point in the mesh. for (int k = 0; k < this->connectors.size(); k++) { + log(DEBUG,"Check connector %d: %s",k,this->connectors[k].GetServerName().c_str()); // search for another point in the mesh which can 'reach' where we want to go for (int m = 0; m < this->connectors[k].routes.size(); m++) { + log(DEBUG,"Check connector %d: %s route %s",k,this->connectors[k].GetServerName().c_str(),this->connectors[k].routes[m].c_str()); if (!strcasecmp(this->connectors[k].routes[m].c_str(),sendhost)) { log(DEBUG,"Found alternative route for packet: %s",this->connectors[k].GetServerName().c_str()); @@ -434,7 +437,7 @@ bool connection::SendPacket(char *message, const char* sendhost) char buffer[MAXBUF]; snprintf(buffer,MAXBUF,"& %s",sendhost); NetSendToAllExcept(sendhost,buffer); - log(DEBUG,"There are no routes to %s, we're gonna boot the server off!",sendhost); + log(DEBUG,"\n\nThere are no routes to %s, we're gonna boot the server off!\n\n",sendhost); DoSplit(sendhost); return false; } -- 2.39.5