avoid double mutex lock

Origin commit data
------------------
Branch: ni/coolstream
Commit: c9c8652834
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2024-09-02 (Mon, 02 Sep 2024)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2024-09-02 21:06:01 +02:00
committed by vanhofen
parent d687e1f0df
commit 17ccb41d03

View File

@@ -1427,11 +1427,14 @@ int CRecordManager::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data
#if 0
else if(data == check_timer) {
if(CNeutrinoApp::getInstance()->getMode() != NeutrinoModes::mode_standby) {
mutex.lock();
int have_err = 0;
bool locked = mutex.trylock();
if (!locked) {
have_err = 0;
for(recmap_iterator_t it = recmap.begin(); it != recmap.end(); it++)
have_err |= it->second->GetStatus();
mutex.unlock();
}
//printf("%s: check status: show err %d warn %d have_err %d\n", __FUNCTION__, error_display, warn_display, have_err); //FIXME
if (have_err) {
if ((have_err & REC_STATUS_OVERFLOW) && error_display) {