cec: also log the libCEC version in the 'connected to the CEC adapter' log entry...
authorLars Op den Kamp <lars@opdenkamp.eu>
Wed, 25 Apr 2012 13:21:16 +0000 (15:21 +0200)
committerLars Op den Kamp <lars@opdenkamp.eu>
Wed, 25 Apr 2012 13:24:52 +0000 (15:24 +0200)
src/lib/CECProcessor.cpp

index 68823d18656b49ec23c273e37ac15f52feae4ff6..32f9947bf51fdca2c1c4598d89e152c284514c3f 100644 (file)
@@ -189,13 +189,15 @@ bool CCECProcessor::OpenConnection(const char *strPort, uint16_t iBaudRate, uint
   {
     m_configuration.iFirmwareVersion = m_communication->GetFirmwareVersion();
     uint32_t iBuildDate = m_communication->GetFirmwareBuildDate();
-    CLibCEC::AddLog(CEC_LOG_NOTICE, "connected to the CEC adapter. firmware version = %d, client version = %s", m_configuration.iFirmwareVersion, ToString((cec_client_version)m_configuration.clientVersion));
+    CStdString strLog;
+    strLog.Format("connected to the CEC adapter. libCEC version = %s, client version = %s, firmware version = %d", ToString((cec_server_version)m_configuration.serverVersion), ToString((cec_client_version)m_configuration.clientVersion), m_configuration.iFirmwareVersion);
     if (iBuildDate > 0)
     {
       time_t buildTime = (time_t)iBuildDate;
-      CLibCEC::AddLog(CEC_LOG_NOTICE, "Firmware build date: %s", asctime(localtime(&buildTime)));
+      strLog.AppendFormat(", firmware build date: %s +0000", asctime(gmtime(&buildTime)));
+      strLog = strLog.Left(strLog.length() - 1); // strip \n added by asctime
     }
-
+    CLibCEC::AddLog(CEC_LOG_NOTICE, strLog);
   }
 
   if (m_configuration.bGetSettingsFromROM == 1)