From: Lars Op den Kamp Date: Thu, 27 Oct 2011 18:10:52 +0000 (+0200) Subject: cec: fixed vendorid. it should be uint64_t after all :) X-Git-Tag: upstream/2.2.0~1^2~209 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=2cd8b5d0166395adb0380950d5d38a2387b382a3;p=deb_libcec.git cec: fixed vendorid. it should be uint64_t after all :) --- diff --git a/src/lib/CECBusDevice.cpp b/src/lib/CECBusDevice.cpp index d0104d0..45f30a5 100644 --- a/src/lib/CECBusDevice.cpp +++ b/src/lib/CECBusDevice.cpp @@ -70,7 +70,7 @@ void CCECBusDevice::AddLog(cec_log_level level, const CStdString &strMessage) m_processor->AddLog(level, strMessage); } -void CCECBusDevice::SetVendorId(uint32_t iVendorId, uint8_t iVendorClass /* = 0 */) +void CCECBusDevice::SetVendorId(uint64_t iVendorId, uint8_t iVendorClass /* = 0 */) { m_iVendorId = iVendorId; m_iVendorClass = iVendorClass; diff --git a/src/lib/CECBusDevice.h b/src/lib/CECBusDevice.h index dcd30a1..9cc7fdc 100644 --- a/src/lib/CECBusDevice.h +++ b/src/lib/CECBusDevice.h @@ -52,9 +52,9 @@ namespace CEC virtual cec_logical_address GetMyLogicalAddress(void) const; virtual uint16_t GetMyPhysicalAddress(void) const; - virtual void SetVendorId(uint32_t iVendorId, uint8_t iVendorClass = 0); + virtual void SetVendorId(uint64_t iVendorId, uint8_t iVendorClass = 0); virtual const char *GetVendorName(void) const { return CECVendorIdToString(m_iVendorId); } - virtual uint32_t GetVendorId(void) const { return m_iVendorId; } + virtual uint64_t GetVendorId(void) const { return m_iVendorId; } virtual uint8_t GetVendorClass(void) const { return m_iVendorClass; } virtual uint64_t GetLastActive(void) const { return m_iLastActive; } @@ -74,7 +74,7 @@ namespace CEC cec_logical_address m_iLogicalAddress; CCECProcessor *m_processor; CCECCommandHandler *m_handler; - uint32_t m_iVendorId; + uint64_t m_iVendorId; uint8_t m_iVendorClass; uint64_t m_iLastActive; CMutex m_mutex; diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index 6bfab0d..648ec20 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -533,9 +533,9 @@ void CCECProcessor::ParseVendorId(cec_logical_address device, const cec_datapack return; } - uint32_t iVendorId = ((uint32_t)data[0] << 3) + - ((uint32_t)data[1] << 2) + - (uint32_t)data[2]; + uint64_t iVendorId = ((uint64_t)data[0] << 3) + + ((uint64_t)data[1] << 2) + + (uint64_t)data[2]; m_busDevices[(uint8_t)device]->SetVendorId(iVendorId, data.size >= 4 ? data[3] : 0); }