Skip to content
Permalink
Browse files

fixed: return CEC_DEFAULT_PHYSICAL_ADDRESS if the address can't be re…

…ad for aocec
  • Loading branch information...
opdenkamp committed Oct 26, 2016
1 parent d03dd79 commit b0c6306671d4c0739241b658dd87ec59ff248014
Showing with 2 additions and 4 deletions.
  1. +0 −2 src/libcec/adapter/AOCEC/AOCEC.h
  2. +2 −2 src/libcec/adapter/AOCEC/AOCECAdapterCommunication.cpp
@@ -35,8 +35,6 @@
*/


#define CEC_DEFAULT_PADDR 0x1000

#define CEC_IOC_MAGIC 'C'
#define CEC_IOC_GET_PHYSICAL_ADDR _IOR(CEC_IOC_MAGIC, 0x00, uint16_t)
#define CEC_IOC_GET_VERSION _IOR(CEC_IOC_MAGIC, 0x01, int)
@@ -205,7 +205,7 @@ cec_vendor_id CAOCECAdapterCommunication::GetVendorId(void)

uint16_t CAOCECAdapterCommunication::GetPhysicalAddress(void)
{
int phys_addr = CEC_DEFAULT_PADDR;
int phys_addr = CEC_INVALID_PHYSICAL_ADDRESS;

CLockObject lock(m_mutex);

@@ -215,7 +215,7 @@ uint16_t CAOCECAdapterCommunication::GetPhysicalAddress(void)
if (ioctl(m_fd, CEC_IOC_GET_PHYSICAL_ADDR, &phys_addr) < 0)
{
LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: IOCTL CEC_IOC_GET_PHYSICAL_ADDR failed !", __func__);
phys_addr = CEC_DEFAULT_PADDR;
phys_addr = CEC_INVALID_PHYSICAL_ADDRESS;
}
return (uint16_t)phys_addr;
}

0 comments on commit b0c6306

Please sign in to comment.
You can’t perform that action at this time.