X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fimplementations%2FCECCommandHandler.cpp;h=1343a0cb50e521e84ad7931df0988a93985b1ee6;hb=0c4d556d442f5a4483080ce3dcc2ec208f75bcaa;hp=28cee428128f5caadbc5cf2346fb0c8377c66537;hpb=16f47961800432dbdd5b3ead717908f383d26d6b;p=deb_libcec.git diff --git a/src/lib/implementations/CECCommandHandler.cpp b/src/lib/implementations/CECCommandHandler.cpp index 28cee42..1343a0c 100644 --- a/src/lib/implementations/CECCommandHandler.cpp +++ b/src/lib/implementations/CECCommandHandler.cpp @@ -1265,3 +1265,31 @@ void CCECCommandHandler::ScheduleActivateSource(uint64_t iDelay) CLockObject lock(m_mutex); m_iActiveSourcePending = GetTimeMs() + iDelay; } + +void CCECCommandHandler::RequestEmailFromCustomer(const cec_command& command) +{ + bool bInserted(false); + map >::iterator it = m_logsRequested.find(command.opcode); + if (it != m_logsRequested.end()) + { + for (vector::const_iterator it2 = it->second.begin(); it2 != it->second.end(); it2++) + { + // we already logged this one + if ((*it2).parameters == command.parameters) + return; + } + + it->second.push_back(command); + bInserted = true; + } + + if (!bInserted) + { + vector commands; + commands.push_back(command); + m_logsRequested.insert(make_pair(command.opcode, commands)); + } + + LIB_CEC->AddLog(CEC_LOG_NOTICE, "Unmapped code detected. Please send an email to support@pulse-eight.com with the following details, and if you pressed a key, tell us which one you pressed, and we'll add support for this it.\nCEC command: %s\nVendor ID: %s (%06x)", CCECTypeUtils::ToString(command).c_str(), CCECTypeUtils::ToString(m_vendorId), m_vendorId); +} +