cec: added a hook in libcec for physical address autodetection
[deb_libcec.git] / src / lib / AdapterCommunication.cpp
index e772d351cbd265fdf6a1a9d4b764edebd0f28e5e..74ea9e3f33826363d4ab34e6caf50ff99a0ae2d9 100644 (file)
@@ -282,7 +282,7 @@ bool CAdapterCommunication::Open(const char *strPort, uint16_t iBaudRate /* = 38
 
   //clear any input bytes
   uint8_t buff[1024];
-  m_port->Read(buff, sizeof(buff), 500);
+  while (m_port->Read(buff, sizeof(buff), 500) > 0) {}
 
   if (CreateThread())
   {