cec: fix background polling and libcec exit
[deb_libcec.git] / src / testclient / main.cpp
index 0ac1c714633b225bf7b263d2491dfd8ab3afaaee..7837c12a6a970554a7b569a52e069a78065fd426 100644 (file)
@@ -609,7 +609,7 @@ bool ProcessCommandLAD(ICECAdapter *parser, const string &command, string &argum
   {
     cout << "listing active devices:" << endl;
     cec_logical_addresses addresses = parser->GetActiveDevices();
-    for (uint8_t iPtr = 0; iPtr < 16; iPtr++)
+    for (uint8_t iPtr = 0; iPtr <= 11; iPtr++)
       if (addresses[iPtr])
         cout << "logical address " << (int)iPtr << endl;
     return true;
@@ -997,6 +997,7 @@ int main (int argc, char *argv[])
 
   if (!g_bSingleCommand)
   {
+    FlushLog(parser);
     cout << "cec device opened" << endl;
 
     parser->PowerOnDevices(CECDEVICE_TV);