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

Now avoiding calling poll() in cSectionHandler::Action() if there are no filters

This commit is contained in:
Klaus Schmidinger 2022-12-06 12:25:08 +01:00
parent 548a33c728
commit c06d2389e9
3 changed files with 11 additions and 2 deletions

View File

@ -2204,6 +2204,8 @@ Marko M
for adding support for kernel based LIRC driver for adding support for kernel based LIRC driver
for reporting a possible heap-use-after-free in cDvbTuner::Action() for reporting a possible heap-use-after-free in cDvbTuner::Action()
for reporting a flaw in initializing cDvbPlayerControl and cTransferControl for reporting a flaw in initializing cDvbPlayerControl and cTransferControl
for reporting a possible call to poll() in cSectionHandler::Action() without any
filters
Patrick Rother <krd-vdr@gulu.net> Patrick Rother <krd-vdr@gulu.net>
for reporting a bug in defining timers that only differ in the day of week for reporting a bug in defining timers that only differ in the day of week

View File

@ -9816,7 +9816,7 @@ Video Disk Recorder Revision History
- Added missing rounding when dividing frequencies in processing the NIT (thanks to - Added missing rounding when dividing frequencies in processing the NIT (thanks to
Winfried Köhler). Winfried Köhler).
2022-12-05: 2022-12-06:
- Fixed a compiler warning. - Fixed a compiler warning.
- Fixed generating the index file in the cutter (reported by Christoph Haubrich). - Fixed generating the index file in the cutter (reported by Christoph Haubrich).
@ -9824,3 +9824,5 @@ Video Disk Recorder Revision History
- Added code for the 'qks' audio track (thanks to Johann Friedrichs). - Added code for the 'qks' audio track (thanks to Johann Friedrichs).
- Fixed a possible heap-use-after-free in cDvbTuner::Action() (reported by Marko Mäkelä). - Fixed a possible heap-use-after-free in cDvbTuner::Action() (reported by Marko Mäkelä).
- Fixed initializing cDvbPlayerControl and cTransferControl (reported by Marko Mäkelä). - Fixed initializing cDvbPlayerControl and cTransferControl (reported by Marko Mäkelä).
- Now avoiding calling poll() in cSectionHandler::Action() if there are no filters
(reported by Marko Mäkelä).

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: sections.c 5.3 2022/01/31 21:21:42 kls Exp $ * $Id: sections.c 5.4 2022/12/06 12:25:08 kls Exp $
*/ */
#include "sections.h" #include "sections.h"
@ -180,6 +180,11 @@ void cSectionHandler::Action(void)
startFilters = false; startFilters = false;
} }
int NumFilters = filterHandles.Count(); int NumFilters = filterHandles.Count();
if (NumFilters == 0) {
Unlock();
cCondWait::SleepMs(100);
continue;
}
pollfd pfd[NumFilters]; pollfd pfd[NumFilters];
for (cFilterHandle *fh = filterHandles.First(); fh; fh = filterHandles.Next(fh)) { for (cFilterHandle *fh = filterHandles.First(); fh; fh = filterHandles.Next(fh)) {
int i = fh->Index(); int i = fh->Index();