Skip to content

Commit

Permalink
Reduce count of debug messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
dchapyshev committed Dec 2, 2023
1 parent 8070d6a commit 79f37f9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
8 changes: 3 additions & 5 deletions source/base/peer/client_authenticator.cc
Expand Up @@ -435,11 +435,9 @@ bool ClientAuthenticator::readSessionChallenge(const ByteArray& buffer)
setPeerComputerName(challenge->computer_name());
setPeerArch(challenge->arch());

LOG(LS_INFO) << "Server Version: " << peerVersion();
LOG(LS_INFO) << "Server Name: " << challenge->computer_name();
LOG(LS_INFO) << "Server OS: " << challenge->os_name();
LOG(LS_INFO) << "Server CPU Cores: " << challenge->cpu_cores();
LOG(LS_INFO) << "Server Arch: " << challenge->arch();
LOG(LS_INFO) << "Server (version=" << peerVersion() << " name=" << challenge->computer_name()
<< " os=" << challenge->os_name() << " cores=" << challenge->cpu_cores()
<< " arch=" << challenge->arch() << ")";

if (peerVersion() < base::Version::kMinimumSupportedVersion)
{
Expand Down
24 changes: 11 additions & 13 deletions source/base/peer/server_authenticator.cc
Expand Up @@ -590,33 +590,31 @@ void ServerAuthenticator::onSessionResponse(const ByteArray& buffer)
{
LOG(LS_INFO) << "Received: SessionResponse";

std::unique_ptr<proto::SessionResponse> session_response =
std::unique_ptr<proto::SessionResponse> response =
std::make_unique<proto::SessionResponse>();
if (!parse(buffer, session_response.get()))
if (!parse(buffer, response.get()))
{
finish(FROM_HERE, ErrorCode::PROTOCOL_ERROR);
return;
}

setPeerVersion(session_response->version());
setPeerOsName(session_response->os_name());
setPeerComputerName(session_response->computer_name());
setPeerArch(session_response->arch());
setPeerVersion(response->version());
setPeerOsName(response->os_name());
setPeerComputerName(response->computer_name());
setPeerArch(response->arch());

LOG(LS_INFO) << "Client Session Type: " << session_response->session_type();
LOG(LS_INFO) << "Client Version: " << peerVersion();
LOG(LS_INFO) << "Client Name: " << session_response->computer_name();
LOG(LS_INFO) << "Client OS: " << session_response->os_name();
LOG(LS_INFO) << "Client CPU Cores: " << session_response->cpu_cores();
LOG(LS_INFO) << "Client Arch: " << session_response->arch();
LOG(LS_INFO) << "Client (session_type=" << response->session_type()
<< " version=" << peerVersion() << " name=" << response->computer_name()
<< " os=" << response->os_name() << " cores=" << response->cpu_cores()
<< " arch=" << response->arch() << ")";

if (peerVersion() < base::Version::kMinimumSupportedVersion)
{
finish(FROM_HERE, ErrorCode::VERSION_ERROR);
return;
}

BitSet<uint32_t> session_type = session_response->session_type();
BitSet<uint32_t> session_type = response->session_type();
if (session_type.count() != 1)
{
finish(FROM_HERE, ErrorCode::PROTOCOL_ERROR);
Expand Down

0 comments on commit 79f37f9

Please sign in to comment.