mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
[Performance] Reworked how all log calls are made in the source, see changelog.txt for more details
This commit is contained in:
+10
-10
@@ -47,7 +47,7 @@ void EQStreamIdentifier::Process() {
|
||||
//first see if this stream has expired
|
||||
if(r.expire.Check(false)) {
|
||||
//this stream has failed to match any pattern in our timeframe.
|
||||
Log.Out(Logs::General, Logs::Netcode, "[IDENTIFY] Unable to identify stream from %s:%d before timeout.", long2ip(r.stream->GetRemoteIP()).c_str(), ntohs(r.stream->GetRemotePort()));
|
||||
Log(Logs::General, Logs::Netcode, "[IDENTIFY] Unable to identify stream from %s:%d before timeout.", long2ip(r.stream->GetRemoteIP()).c_str(), ntohs(r.stream->GetRemotePort()));
|
||||
r.stream->ReleaseFromUse();
|
||||
cur = m_streams.erase(cur);
|
||||
continue;
|
||||
@@ -62,23 +62,23 @@ void EQStreamIdentifier::Process() {
|
||||
}
|
||||
if(r.stream->GetState() != ESTABLISHED) {
|
||||
//the stream closed before it was identified.
|
||||
Log.Out(Logs::General, Logs::Netcode, "[IDENTIFY] Unable to identify stream from %s:%d before it closed.", long2ip(r.stream->GetRemoteIP()).c_str(), ntohs(r.stream->GetRemotePort()));
|
||||
Log(Logs::General, Logs::Netcode, "[IDENTIFY] Unable to identify stream from %s:%d before it closed.", long2ip(r.stream->GetRemoteIP()).c_str(), ntohs(r.stream->GetRemotePort()));
|
||||
switch(r.stream->GetState())
|
||||
{
|
||||
case ESTABLISHED:
|
||||
Log.Out(Logs::General, Logs::Netcode, "[IDENTIFY] Stream state was Established");
|
||||
Log(Logs::General, Logs::Netcode, "[IDENTIFY] Stream state was Established");
|
||||
break;
|
||||
case CLOSING:
|
||||
Log.Out(Logs::General, Logs::Netcode, "[IDENTIFY] Stream state was Closing");
|
||||
Log(Logs::General, Logs::Netcode, "[IDENTIFY] Stream state was Closing");
|
||||
break;
|
||||
case DISCONNECTING:
|
||||
Log.Out(Logs::General, Logs::Netcode, "[IDENTIFY] Stream state was Disconnecting");
|
||||
Log(Logs::General, Logs::Netcode, "[IDENTIFY] Stream state was Disconnecting");
|
||||
break;
|
||||
case CLOSED:
|
||||
Log.Out(Logs::General, Logs::Netcode, "[IDENTIFY] Stream state was Closed");
|
||||
Log(Logs::General, Logs::Netcode, "[IDENTIFY] Stream state was Closed");
|
||||
break;
|
||||
default:
|
||||
Log.Out(Logs::General, Logs::Netcode, "[IDENTIFY] Stream state was Unestablished or unknown");
|
||||
Log(Logs::General, Logs::Netcode, "[IDENTIFY] Stream state was Unestablished or unknown");
|
||||
break;
|
||||
}
|
||||
r.stream->ReleaseFromUse();
|
||||
@@ -108,7 +108,7 @@ void EQStreamIdentifier::Process() {
|
||||
case EQStream::MatchSuccessful: {
|
||||
//yay, a match.
|
||||
|
||||
Log.Out(Logs::General, Logs::Netcode, "[IDENTIFY] Identified stream %s:%d with signature %s", long2ip(r.stream->GetRemoteIP()).c_str(), ntohs(r.stream->GetRemotePort()), p->name.c_str());
|
||||
Log(Logs::General, Logs::Netcode, "[IDENTIFY] Identified stream %s:%d with signature %s", long2ip(r.stream->GetRemoteIP()).c_str(), ntohs(r.stream->GetRemotePort()), p->name.c_str());
|
||||
|
||||
// before we assign the eqstream to an interface, let the stream recognize it is in use and the session should not be reset any further
|
||||
r.stream->SetActive(true);
|
||||
@@ -122,7 +122,7 @@ void EQStreamIdentifier::Process() {
|
||||
}
|
||||
case EQStream::MatchFailed:
|
||||
//do nothing...
|
||||
Log.Out(Logs::General, Logs::Netcode, "[IDENT_TRACE] %s:%d: Tried patch %s, and it did not match.", long2ip(r.stream->GetRemoteIP()).c_str(), ntohs(r.stream->GetRemotePort()), p->name.c_str());
|
||||
Log(Logs::General, Logs::Netcode, "[IDENT_TRACE] %s:%d: Tried patch %s, and it did not match.", long2ip(r.stream->GetRemoteIP()).c_str(), ntohs(r.stream->GetRemotePort()), p->name.c_str());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -130,7 +130,7 @@ void EQStreamIdentifier::Process() {
|
||||
//if we checked all patches and did not find a match.
|
||||
if(all_ready && !found_one) {
|
||||
//the stream cannot be identified.
|
||||
Log.Out(Logs::General, Logs::Netcode, "[IDENTIFY] Unable to identify stream from %s:%d, no match found.", long2ip(r.stream->GetRemoteIP()).c_str(), ntohs(r.stream->GetRemotePort()));
|
||||
Log(Logs::General, Logs::Netcode, "[IDENTIFY] Unable to identify stream from %s:%d, no match found.", long2ip(r.stream->GetRemoteIP()).c_str(), ntohs(r.stream->GetRemotePort()));
|
||||
r.stream->ReleaseFromUse();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user