mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-22 07:01:30 +00:00
[idd] lgmp: remove old debug logging
This commit is contained in:
@@ -362,8 +362,6 @@ bool CLGMPInputTransport::Claim(
|
|||||||
RenewLease();
|
RenewLease();
|
||||||
UpdateTargetState(m_target->GetState(source));
|
UpdateTargetState(m_target->GetState(source));
|
||||||
++m_statistics.claims;
|
++m_statistics.claims;
|
||||||
DEBUG_INFO("Input owner %u generation %u acquired",
|
|
||||||
m_ownerClientID, m_ownerGeneration);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -372,14 +370,11 @@ void CLGMPInputTransport::RenewLease()
|
|||||||
m_ownerDeadline = GetTickCount64() + OWNER_LEASE_MS;
|
m_ownerDeadline = GetTickCount64() + OWNER_LEASE_MS;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CLGMPInputTransport::ReleaseOwner(
|
void CLGMPInputTransport::ReleaseOwner(bool reset)
|
||||||
bool reset, const char * reason)
|
|
||||||
{
|
{
|
||||||
if (!m_ownerClientID)
|
if (!m_ownerClientID)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const uint32_t clientID = m_ownerClientID;
|
|
||||||
const uint32_t generation = m_ownerGeneration;
|
|
||||||
if (m_target)
|
if (m_target)
|
||||||
{
|
{
|
||||||
m_target->Release(Owner(), reset);
|
m_target->Release(Owner(), reset);
|
||||||
@@ -391,8 +386,6 @@ void CLGMPInputTransport::ReleaseOwner(
|
|||||||
m_ownerSequence = 0;
|
m_ownerSequence = 0;
|
||||||
m_ownerDeadline = 0;
|
m_ownerDeadline = 0;
|
||||||
++m_statistics.releases;
|
++m_statistics.releases;
|
||||||
DEBUG_INFO("Input owner %u generation %u released (%s)",
|
|
||||||
clientID, generation, reason);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CLGMPInputTransport::CheckOwner()
|
void CLGMPInputTransport::CheckOwner()
|
||||||
@@ -408,12 +401,12 @@ void CLGMPInputTransport::CheckOwner()
|
|||||||
|
|
||||||
if (!state.available || !state.owned)
|
if (!state.available || !state.owned)
|
||||||
{
|
{
|
||||||
ReleaseOwner(false, "input ownership changed");
|
ReleaseOwner(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GetTickCount64() >= m_ownerDeadline)
|
if (GetTickCount64() >= m_ownerDeadline)
|
||||||
ReleaseOwner(true, "lease expired");
|
ReleaseOwner(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CLGMPInputTransport::ValidatePayload(
|
bool CLGMPInputTransport::ValidatePayload(
|
||||||
@@ -472,7 +465,7 @@ bool CLGMPInputTransport::ProcessMessage(
|
|||||||
{
|
{
|
||||||
++m_statistics.malformedMessage;
|
++m_statistics.malformedMessage;
|
||||||
if (owner)
|
if (owner)
|
||||||
ReleaseOwner(true, "invalid input message");
|
ReleaseOwner(true);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -493,7 +486,7 @@ bool CLGMPInputTransport::ProcessMessage(
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
++m_statistics.sequenceErrors;
|
++m_statistics.sequenceErrors;
|
||||||
ReleaseOwner(true, "sequence discontinuity");
|
ReleaseOwner(true);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return Claim(sourceClientID, message);
|
return Claim(sourceClientID, message);
|
||||||
@@ -509,7 +502,7 @@ bool CLGMPInputTransport::ProcessMessage(
|
|||||||
if (message.sequence != expectedSequence)
|
if (message.sequence != expectedSequence)
|
||||||
{
|
{
|
||||||
++m_statistics.sequenceErrors;
|
++m_statistics.sequenceErrors;
|
||||||
ReleaseOwner(true, "sequence discontinuity");
|
ReleaseOwner(true);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -518,7 +511,7 @@ bool CLGMPInputTransport::ProcessMessage(
|
|||||||
switch (message.type)
|
switch (message.type)
|
||||||
{
|
{
|
||||||
case KVMFR_INPUT_MESSAGE_RELEASE:
|
case KVMFR_INPUT_MESSAGE_RELEASE:
|
||||||
ReleaseOwner(true, "client release");
|
ReleaseOwner(true);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case KVMFR_INPUT_MESSAGE_KEEPALIVE:
|
case KVMFR_INPUT_MESSAGE_KEEPALIVE:
|
||||||
@@ -563,7 +556,7 @@ bool CLGMPInputTransport::ProcessMessage(
|
|||||||
if (result != InputResult::ACCEPTED)
|
if (result != InputResult::ACCEPTED)
|
||||||
{
|
{
|
||||||
++m_statistics.deliveryFailures;
|
++m_statistics.deliveryFailures;
|
||||||
ReleaseOwner(true, "input delivery failed");
|
ReleaseOwner(true);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -603,7 +596,7 @@ bool CLGMPInputTransport::DrainMessages(bool& received)
|
|||||||
DEBUG_WARN("Ignoring invalid KVMFR input message size");
|
DEBUG_WARN("Ignoring invalid KVMFR input message size");
|
||||||
++m_statistics.malformedSize;
|
++m_statistics.malformedSize;
|
||||||
if (sourceClientID == m_ownerClientID)
|
if (sourceClientID == m_ownerClientID)
|
||||||
ReleaseOwner(true, "invalid input message");
|
ReleaseOwner(true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -733,7 +726,7 @@ void CLGMPInputTransport::Thread()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ReleaseOwner(true, "transport stopped");
|
ReleaseOwner(true);
|
||||||
UpdateTargetState({});
|
UpdateTargetState({});
|
||||||
PublishStatus();
|
PublishStatus();
|
||||||
if (failed && m_target)
|
if (failed && m_target)
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ private:
|
|||||||
bool Claim(uint32_t sourceClientID,
|
bool Claim(uint32_t sourceClientID,
|
||||||
const KVMFRInputMessage& message);
|
const KVMFRInputMessage& message);
|
||||||
void RenewLease();
|
void RenewLease();
|
||||||
void ReleaseOwner(bool reset, const char * reason);
|
void ReleaseOwner(bool reset);
|
||||||
void CheckOwner();
|
void CheckOwner();
|
||||||
void Thread();
|
void Thread();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user