cec: close the connection when a comm error was detected, and notify the client via...
[deb_libcec.git] / src / cec-config / cec-config.cpp
index d5f954eb7b5e2a4016ac55442fec033dde994c8c..5dbb9c8de19f6226ff26c8ee646cde7e48915bc7 100644 (file)
@@ -144,7 +144,6 @@ void EnableCallbacks(ICECAdapter *adapter)
   g_callbacks.CBCecLogMessage = &CecLogMessage;
   g_callbacks.CBCecKeyPress   = &CecKeyPress;
   g_callbacks.CBCecCommand    = &CecCommand;
-  g_callbacks.CBCecConfigurationChanged = NULL;
   adapter->EnableCallbacks(NULL, &g_callbacks);
 }
 
@@ -235,11 +234,8 @@ int8_t FindPhysicalAddressPortNumber(void)
   if (input.empty())
     return -1;
 
-  int8_t hdmiport = atoi(input.c_str());
-  if (hdmiport < 1 || hdmiport > 15)
-      return -1;
-
-  return hdmiport;
+  int hdmiport = atoi(input.c_str());
+  return (hdmiport < 1 || hdmiport > 15) ? -1 : (int8_t)hdmiport;
 }
 
 cec_logical_address FindPhysicalAddressBaseDevice(void)