-bool CCECProcessor::SwitchMonitoring(bool bEnable)
-{
- m_libcec->AddLog(CEC_LOG_NOTICE, "== %s monitoring mode ==", bEnable ? "enabling" : "disabling");
-
- {
- CLockObject lock(m_mutex);
- // switch to monitoring mode, which will stop processing of incoming messages
- m_bMonitor = bEnable;
- // and store the current ackmask
- m_iPreviousAckMask = m_communication->GetAckMask();
- }
-
- // set the mask to 0 when enabling monitor mode
- if (bEnable)
- return SetAckMask(0);
- // and restore the previous mask otherwise
- else
- return SetAckMask(m_iPreviousAckMask);
-}
-