Show extra debug for burst time

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8802 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
w00t 2008-02-03 11:43:30 +00:00
parent 43aaead8a8
commit 7483f170de
2 changed files with 6 additions and 5 deletions

View File

@ -31,7 +31,7 @@ TreeServer::TreeServer(SpanningTreeUtilities* Util, InspIRCd* Instance, const st
ServerDesc.clear(); ServerDesc.clear();
VersionString.clear(); VersionString.clear();
ServerUserCount = ServerOperCount = 0; ServerUserCount = ServerOperCount = 0;
rtt = 0; StartBurst = rtt = 0;
Warned = Hidden = DupError = false; Warned = Hidden = DupError = false;
VersionString = ServerInstance->GetVersionString(); VersionString = ServerInstance->GetVersionString();
SetID(id); SetID(id);
@ -50,7 +50,7 @@ TreeServer::TreeServer(SpanningTreeUtilities* Util, InspIRCd* Instance, std::str
VersionString = ServerInstance->GetVersionString(); VersionString = ServerInstance->GetVersionString();
Route = NULL; Route = NULL;
Socket = NULL; /* Fix by brain */ Socket = NULL; /* Fix by brain */
rtt = 0; StartBurst = rtt = 0;
Warned = Hidden = DupError = false; Warned = Hidden = DupError = false;
AddHashEntry(); AddHashEntry();
SetID(id); SetID(id);
@ -68,7 +68,7 @@ TreeServer::TreeServer(SpanningTreeUtilities* Util, InspIRCd* Instance, std::str
this->SetNextPingTime(time(NULL) + Utils->PingFreq); this->SetNextPingTime(time(NULL) + Utils->PingFreq);
this->SetPingFlag(); this->SetPingFlag();
DupError = false; DupError = false;
rtt = 0; StartBurst = rtt = 0;
/* find the 'route' for this server (e.g. the one directly connected /* find the 'route' for this server (e.g. the one directly connected
* to the local server, which we can use to reach it) * to the local server, which we can use to reach it)
* *

View File

@ -1178,6 +1178,7 @@ bool TreeSocket::ProcessLine(std::string &line)
gettimeofday(&t, NULL); gettimeofday(&t, NULL);
long ts = (t.tv_sec * 1000) + (t.tv_usec / 1000); long ts = (t.tv_sec * 1000) + (t.tv_usec / 1000);
Node->StartBurst = ts; Node->StartBurst = ts;
this->Instance->Log(DEBUG, "Started bursting at time %lu", ts);
this->DoBurst(Node); this->DoBurst(Node);
} }
else if (command == "ERROR") else if (command == "ERROR")
@ -1517,8 +1518,8 @@ bool TreeSocket::ProcessLine(std::string &line)
gettimeofday(&t, NULL); gettimeofday(&t, NULL);
long ts = (t.tv_sec * 1000) + (t.tv_usec / 1000); long ts = (t.tv_sec * 1000) + (t.tv_usec / 1000);
unsigned long bursttime = ts - ServerSource->StartBurst; unsigned long bursttime = ts - ServerSource->StartBurst;
this->Instance->SNO->WriteToSnoMask('l', "Received end of netburst from \2%s\2 (burst time: %ul ms)", sourceserv.c_str(), bursttime); this->Instance->SNO->WriteToSnoMask('l', "Received end of netburst from \2%s\2 (burst time: %lu ms)", sourceserv.c_str(), bursttime);
this->Instance->Log(DEBUG, "Ended bursting at %lu (ts: %lu, startburst: %lu)", bursttime, ts, ServerSource->StartBurst);
Event rmode((char*)sourceserv.c_str(), (Module*)Utils->Creator, "new_server"); Event rmode((char*)sourceserv.c_str(), (Module*)Utils->Creator, "new_server");
rmode.Send(Instance); rmode.Send(Instance);