cec: fixed vendorid. it should be uint64_t after all :)
authorLars Op den Kamp <lars@opdenkamp.eu>
Thu, 27 Oct 2011 18:10:52 +0000 (20:10 +0200)
committerLars Op den Kamp <lars@opdenkamp.eu>
Thu, 27 Oct 2011 18:10:52 +0000 (20:10 +0200)
src/lib/CECBusDevice.cpp
src/lib/CECBusDevice.h
src/lib/CECProcessor.cpp

index d0104d077b3a6dbc7a2d30ce30e45b20a59959be..45f30a5951f691a551e1345ca1e1ecf0671ce250 100644 (file)
@@ -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;
index dcd30a14da0f26bd491d9dffe6f71d03e325c160..9cc7fdc05f94931f74351a10fd9e6d66d97721b3 100644 (file)
@@ -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;
index 6bfab0d7b9e0a11f1aecd776abc1681988763443..648ec205babcd70cf6faf3b9e34ff1fea00048c7 100644 (file)
@@ -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);
 }