repositories
/
deb_libcec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cec: fix some logging. only transmit packets once
[deb_libcec.git]
/
src
/
lib
/
CECProcessor.cpp
diff --git
a/src/lib/CECProcessor.cpp
b/src/lib/CECProcessor.cpp
index 571d02d0a184356b894d9c272d7c88de2872b9d7..23bf4c7459c9ed40964730b632304d0190ddcc2f 100644
(file)
--- a/
src/lib/CECProcessor.cpp
+++ b/
src/lib/CECProcessor.cpp
@@
-674,7
+674,7
@@
bool CCECProcessor::Transmit(CCECAdapterMessage *output)
bool bReturn(false);
CLockObject lock(&m_mutex);
{
bool bReturn(false);
CLockObject lock(&m_mutex);
{
- while (output->needs_retry() && ++output->tries <= output->maxTries)
+ do
{
CLockObject msgLock(&output->mutex);
if (!m_communication || !m_communication->Write(output))
{
CLockObject msgLock(&output->mutex);
if (!m_communication || !m_communication->Write(output))
@@
-696,7
+696,7
@@
bool CCECProcessor::Transmit(CCECAdapterMessage *output)
}
else
bReturn = true;
}
else
bReturn = true;
- }
+ }
while (output->transmit_timeout > 0 && output->needs_retry() && ++output->tries <= output->maxTries);
}
return bReturn;
}
return bReturn;
@@
-752,18
+752,21
@@
bool CCECProcessor::WaitForTransmitSucceeded(CCECAdapterMessage *message)
}
if (bError)
}
if (bError)
+ {
message->reply = msg.message();
message->reply = msg.message();
+ m_controller->AddLog(CEC_LOG_DEBUG, msg.ToString());
+ }
else
{
else
{
- m_controller->AddLog(CEC_LOG_DEBUG, msg.ToString());
-
switch(msg.message())
{
case MSGCODE_COMMAND_ACCEPTED:
switch(msg.message())
{
case MSGCODE_COMMAND_ACCEPTED:
+ m_controller->AddLog(CEC_LOG_DEBUG, msg.ToString());
if (iPacketsLeft > 0)
iPacketsLeft--;
break;
case MSGCODE_TRANSMIT_SUCCEEDED:
if (iPacketsLeft > 0)
iPacketsLeft--;
break;
case MSGCODE_TRANSMIT_SUCCEEDED:
+ m_controller->AddLog(CEC_LOG_DEBUG, msg.ToString());
bTransmitSucceeded = (iPacketsLeft == 0);
bError = !bTransmitSucceeded;
message->reply = MSGCODE_TRANSMIT_SUCCEEDED;
bTransmitSucceeded = (iPacketsLeft == 0);
bError = !bTransmitSucceeded;
message->reply = MSGCODE_TRANSMIT_SUCCEEDED;