1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed locking the Channels list in cDisplayChannel, where the lock was still held when Flush() was called

This commit is contained in:
Klaus Schmidinger 2018-05-06 09:41:03 +02:00
parent 820a0ddb8a
commit d380b57d28
3 changed files with 43 additions and 34 deletions

View File

@ -3316,6 +3316,8 @@ Matthias Senzel <matthias.senzel@t-online.de>
after starting the editing process after starting the editing process
for reporting a problem with setting the initial offset of the cursor in a list menu for reporting a problem with setting the initial offset of the cursor in a list menu
for reporting a high CPU load during replay with active progress display for reporting a high CPU load during replay with active progress display
for reporting that the lock on the Channels list in cDisplayChannel was still held
when Flush() was called
Marek Nazarko <mnazarko@gmail.com> Marek Nazarko <mnazarko@gmail.com>
for translating OSD texts to the Polish language for translating OSD texts to the Polish language

View File

@ -9348,7 +9348,7 @@ Video Disk Recorder Revision History
Senzel). Senzel).
- Official release. - Official release.
2018-04-28: Version 2.4.1 2018-05-06: Version 2.4.1
- Fixed handling the tfRecording flag in the SVDRP commands MODT and UPDT (reported - Fixed handling the tfRecording flag in the SVDRP commands MODT and UPDT (reported
by Johann Friedrichs). by Johann Friedrichs).
@ -9359,3 +9359,5 @@ Video Disk Recorder Revision History
been changed to Skins.QueueMessage(), and cSkins::ProcessQueuedMessages() is now called been changed to Skins.QueueMessage(), and cSkins::ProcessQueuedMessages() is now called
unconditionally in the main loop, and checks whether the current cSkinDisplay object unconditionally in the main loop, and checks whether the current cSkinDisplay object
(if any) implements SetMessage(). (if any) implements SetMessage().
- Fixed locking the Channels list in cDisplayChannel, where the lock was still held
when Flush() was called (reported by Matthias Senzel).

9
menu.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: menu.c 4.75 2018/04/28 12:09:45 kls Exp $ * $Id: menu.c 4.76 2018/05/06 09:30:11 kls Exp $
*/ */
#include "menu.h" #include "menu.h"
@ -4626,14 +4626,17 @@ cDisplayChannel::cDisplayChannel(int Number, bool Switched)
cOsdProvider::OsdSizeChanged(osdState); // just to get the current state cOsdProvider::OsdSizeChanged(osdState); // just to get the current state
positioner = NULL; positioner = NULL;
channel = NULL; channel = NULL;
{
LOCK_CHANNELS_READ; LOCK_CHANNELS_READ;
channel = Channels->GetByNumber(Number); channel = Channels->GetByNumber(Number);
lastPresent = lastFollowing = NULL; lastPresent = lastFollowing = NULL;
if (channel) { if (channel) {
DisplayChannel(); DisplayChannel();
DisplayInfo(); DisplayInfo();
displayChannel->Flush();
} }
}
if (channel)
displayChannel->Flush();
lastTime.Set(); lastTime.Set();
} }
@ -4868,6 +4871,7 @@ eOSState cDisplayChannel::ProcessKey(eKeys Key)
} }
}; };
if (positioner || !timeout || lastTime.Elapsed() < (uint64_t)(Setup.ChannelInfoTime * 1000)) { if (positioner || !timeout || lastTime.Elapsed() < (uint64_t)(Setup.ChannelInfoTime * 1000)) {
{
LOCK_CHANNELS_READ; LOCK_CHANNELS_READ;
if (Key == kNone && !number && group < 0 && !NewChannel && channel && channel->Number() != cDevice::CurrentChannel()) { if (Key == kNone && !number && group < 0 && !NewChannel && channel && channel->Number() != cDevice::CurrentChannel()) {
// makes sure a channel switch through the SVDRP CHAN command is displayed // makes sure a channel switch through the SVDRP CHAN command is displayed
@ -4893,6 +4897,7 @@ eOSState cDisplayChannel::ProcessKey(eKeys Key)
if (Positioner || positioner) // making sure we call SetPositioner(NULL) if there is a switch from "with" to "without" positioner if (Positioner || positioner) // making sure we call SetPositioner(NULL) if there is a switch from "with" to "without" positioner
displayChannel->SetPositioner(Positioner); displayChannel->SetPositioner(Positioner);
positioner = Positioner; positioner = Positioner;
}
displayChannel->Flush(); displayChannel->Flush();
return osContinue; return osContinue;
} }