From: Lars Op den Kamp Date: Sun, 10 Jun 2012 11:34:08 +0000 (+0200) Subject: cec: fixed missing firmware version and build date in cec-client -l / GetDeviceInform... X-Git-Tag: upstream/2.2.0~1^2~23^2^2~1 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=5943b9d1475c5a0a2fa2e32a342e15f8658c3088;p=deb_libcec.git cec: fixed missing firmware version and build date in cec-client -l / GetDeviceInformation() --- diff --git a/src/lib/adapter/USBCECAdapterCommands.h b/src/lib/adapter/USBCECAdapterCommands.h index d961240..70feae9 100644 --- a/src/lib/adapter/USBCECAdapterCommands.h +++ b/src/lib/adapter/USBCECAdapterCommands.h @@ -106,6 +106,11 @@ namespace CEC */ uint32_t RequestBuildDate(void); + /*! + * @return The persisted build date. + */ + uint32_t GetPersistedBuildDate(void) const { return m_iBuildDate; }; + private: /*! * @brief Reads all settings from the eeprom. diff --git a/src/lib/adapter/USBCECAdapterCommunication.cpp b/src/lib/adapter/USBCECAdapterCommunication.cpp index bc45167..45be4a6 100644 --- a/src/lib/adapter/USBCECAdapterCommunication.cpp +++ b/src/lib/adapter/USBCECAdapterCommunication.cpp @@ -529,12 +529,12 @@ bool CUSBCECAdapterCommunication::PingAdapter(void) uint16_t CUSBCECAdapterCommunication::GetFirmwareVersion(void) { - return IsOpen() ? m_commands->GetFirmwareVersion() : CEC_FW_VERSION_UNKNOWN; + return m_commands ? m_commands->GetFirmwareVersion() : CEC_FW_VERSION_UNKNOWN; } uint32_t CUSBCECAdapterCommunication::GetFirmwareBuildDate(void) { - return IsOpen() ? m_commands->RequestBuildDate() : 0; + return IsOpen() ? m_commands->RequestBuildDate() : m_commands ? m_commands->GetPersistedBuildDate() : 0; } bool CUSBCECAdapterCommunication::IsRunningLatestFirmware(void)