diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 3a60a001..71e63474 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -2204,6 +2204,8 @@ Marko M for adding support for kernel based LIRC driver for reporting a possible heap-use-after-free in cDvbTuner::Action() for reporting a flaw in initializing cDvbPlayerControl and cTransferControl + for reporting a possible call to poll() in cSectionHandler::Action() without any + filters Patrick Rother for reporting a bug in defining timers that only differ in the day of week diff --git a/HISTORY b/HISTORY index 6d45c5cb..7e096ea9 100644 --- a/HISTORY +++ b/HISTORY @@ -9816,7 +9816,7 @@ Video Disk Recorder Revision History - Added missing rounding when dividing frequencies in processing the NIT (thanks to Winfried Köhler). -2022-12-05: +2022-12-06: - Fixed a compiler warning. - 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). - 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ä). +- Now avoiding calling poll() in cSectionHandler::Action() if there are no filters + (reported by Marko Mäkelä). diff --git a/sections.c b/sections.c index 51a2823c..04b5f5c6 100644 --- a/sections.c +++ b/sections.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * 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" @@ -180,6 +180,11 @@ void cSectionHandler::Action(void) startFilters = false; } int NumFilters = filterHandles.Count(); + if (NumFilters == 0) { + Unlock(); + cCondWait::SleepMs(100); + continue; + } pollfd pfd[NumFilters]; for (cFilterHandle *fh = filterHandles.First(); fh; fh = filterHandles.Next(fh)) { int i = fh->Index();