cec: don't respond with a poll from the broadcast address when receiving in CSLComman...
[deb_libcec.git] / src / lib / implementations / CECCommandHandler.cpp
index 40d7ec37425a26ded517d2c96f3829c2a62ccb8b..6ffc4ac980db71cdfbdbd42cfd577084426e0e00 100644 (file)
 #include "../CECClient.h"
 #include "../CECProcessor.h"
 #include "../LibCEC.h"
+#include "../CECTypeUtils.h"
+#include "../platform/util/util.h"
 
 using namespace CEC;
 using namespace std;
 using namespace PLATFORM;
 
 #define LIB_CEC     m_busDevice->GetProcessor()->GetLib()
-#define ToString(p) LIB_CEC->ToString(p)
+#define ToString(p) CCECTypeUtils::ToString(p)
 
 CCECCommandHandler::CCECCommandHandler(CCECBusDevice *busDevice) :
     m_busDevice(busDevice),
@@ -60,7 +62,7 @@ CCECCommandHandler::CCECCommandHandler(CCECBusDevice *busDevice) :
 
 CCECCommandHandler::~CCECCommandHandler(void)
 {
-  delete m_waitForResponse;
+  DELETE_AND_NULL(m_waitForResponse);
 }
 
 bool CCECCommandHandler::HandleCommand(const cec_command &command)