repositories
/
deb_libcec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add darwin support
[deb_libcec.git]
/
src
/
lib
/
AdapterCommunication.cpp
diff --git
a/src/lib/AdapterCommunication.cpp
b/src/lib/AdapterCommunication.cpp
index 627ce27a476ecfab70cc2186aafc0a6be61533ec..cc83320aae0084e55b7499b360a3e5883f8225e2 100644
(file)
--- a/
src/lib/AdapterCommunication.cpp
+++ b/
src/lib/AdapterCommunication.cpp
@@
-128,16
+128,12
@@
void *CAdapterCommunication::Process(void)
while (!IsStopped())
{
while (!IsStopped())
{
- bool bSignal(false);
{
{
- CLockObject lock(&m_mutex
, true
);
- if (
lock.IsLocked(
))
-
bSignal = ReadFromDevice(100
);
+ CLockObject lock(&m_mutex);
+ if (
ReadFromDevice(50
))
+
m_rcvCondition.Signal(
);
}
}
- if (bSignal)
- m_rcvCondition.Signal();
-
if (!IsStopped())
Sleep(50);
}
if (!IsStopped())
Sleep(50);
}
@@
-192,8
+188,6
@@
bool CAdapterCommunication::Write(const cec_frame &data)
}
m_controller->AddLog(CEC_LOG_DEBUG, "command sent");
}
m_controller->AddLog(CEC_LOG_DEBUG, "command sent");
-
- CCondition::Sleep((uint32_t) data.size * (uint32_t)24 /*data*/ + (uint32_t)5 /*start bit (4.5 ms)*/ + (uint32_t)50 /* to be on the safe side */);
}
return true;
}
return true;