repositories
/
deb_libcec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cec: removed 'retries' from cec_command, to avoid stack smashing when upgrading the...
[deb_libcec.git]
/
src
/
lib
/
CECProcessor.cpp
diff --git
a/src/lib/CECProcessor.cpp
b/src/lib/CECProcessor.cpp
index 463e04448ab15aeb03f88e77c28a73bb23d77b05..a3c22df3169ad9f3851b3b34a30fd38c22cd96c7 100644
(file)
--- a/
src/lib/CECProcessor.cpp
+++ b/
src/lib/CECProcessor.cpp
@@
-717,6
+717,13
@@
bool CCECProcessor::Transmit(const cec_command &data)
LogOutput(data);
CCECAdapterMessage *output = new CCECAdapterMessage(data);
LogOutput(data);
CCECAdapterMessage *output = new CCECAdapterMessage(data);
+
+ /* set the number of retries */
+ if (data.opcode == CEC_OPCODE_NONE)
+ output->maxTries = 1;
+ else if (data.initiator != CECDEVICE_BROADCAST)
+ output->maxTries = m_busDevices[data.initiator]->GetHandler()->GetTransmitRetries() + 1;
+
bReturn = Transmit(output);
/* set to "not present" on failed ack */
bReturn = Transmit(output);
/* set to "not present" on failed ack */
@@
-1335,7
+1342,7
@@
void *CCECBusScan::Process(void)
while (!IsStopped())
{
while (!IsStopped())
{
- if (++iCounter <
3
0)
+ if (++iCounter <
1
0)
{
Sleep(1000);
continue;
{
Sleep(1000);
continue;
@@
-1365,11
+1372,11
@@
void CCECBusScan::WaitUntilIdle(void)
if (IsStopped())
return;
if (IsStopped())
return;
- int
64_t iWaitTime = 3000 -
(GetTimeMs() - m_processor->GetLastTransmission());
+ int
32_t iWaitTime = 3000 - (int32_t)
(GetTimeMs() - m_processor->GetLastTransmission());
while (iWaitTime > 0)
{
Sleep(iWaitTime);
while (iWaitTime > 0)
{
Sleep(iWaitTime);
- iWaitTime = 3000 - (GetTimeMs() - m_processor->GetLastTransmission());
+ iWaitTime = 3000 - (
int32_t)(
GetTimeMs() - m_processor->GetLastTransmission());
}
}
}
}