cec: extracted a thread class. fixed bug: pthread_cond_wait was called without the...
[deb_libcec.git] / src / lib / Communication.cpp
index f0000466013977f14e73fad2bb8d3879e446def7..fd86b539aae20bb6d91166ec16d6b84328fea6a8 100644 (file)
@@ -182,7 +182,7 @@ bool CCommunication::Read(cec_frame &msg, int iTimeout)
 {
   CLockObject lock(&m_bufferMutex);
 
-  while (m_iInbufUsed < 1)
+  if (m_iInbufUsed < 1)
     m_condition.Wait(&m_bufferMutex, iTimeout);
 
   if (m_iInbufUsed < 1)