cec: close the connection when a comm error was detected, and notify the client via...
[deb_libcec.git] / src / lib / adapter / USBCECAdapterMessageQueue.cpp
index 9c66051f5e368640e27bc128e5185b55839dd77a..7f988949e0d93a5b9f10a60c3832a0d64e4ec010 100644 (file)
@@ -279,10 +279,7 @@ bool CCECAdapterMessageQueue::Write(CCECAdapterMessage *msg)
   /* set the correct line timeout */
   if (msg->IsTranmission())
   {
-    if (msg->tries == 1)
-      m_com->SetLineTimeout(msg->lineTimeout);
-    else
-      m_com->SetLineTimeout(msg->retryTimeout);
+    m_com->SetLineTimeout(msg->lineTimeout);
   }
 
   CCECAdapterMessageQueueEntry *entry(NULL);
@@ -316,6 +313,7 @@ bool CCECAdapterMessageQueue::Write(CCECAdapterMessage *msg)
 
     CLockObject lock(m_mutex);
     m_messages.erase(iEntryId);
+    delete entry;
   }
 
   return bReturn;