summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-02-26 15:10:02 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2006-02-26 15:10:02 +0100
commit58985f6dc1b0e6d6b1ac3cc99075400b163be523 (patch)
tree58e24e59d60a2e4813780e34aeba5e5b801f07ad
parent46ad11bcf8057fbe428e9062bf59b8b2a2e10a51 (diff)
downloadvdr-58985f6dc1b0e6d6b1ac3cc99075400b163be523.tar.gz
vdr-58985f6dc1b0e6d6b1ac3cc99075400b163be523.tar.bz2
Fixed cSchedule::GetFollowingEvent() in case there is currently no present event running1.3.44
-rw-r--r--CONTRIBUTORS4
-rw-r--r--HISTORY2
-rw-r--r--epg.c9
3 files changed, 14 insertions, 1 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index f2ab0839..4b9f40bf 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1767,3 +1767,7 @@ Bárta Vladimír <vladimir.barta@k2atmitec.cz>
Christoph Haubrich <christoph1.haubrich@arcor.de>
for making the "Ok" key in the "Jump" mode of the replay progress display confirm
the jump instead of closing the display
+
+Pekka Mauno <pekka.mauno@iki.fi>
+ for fixing cSchedule::GetFollowingEvent() in case there is currently no present
+ event running
diff --git a/HISTORY b/HISTORY
index c8f09224..2b6cb5b7 100644
--- a/HISTORY
+++ b/HISTORY
@@ -4412,3 +4412,5 @@ Video Disk Recorder Revision History
(suggested by Matthias Schniedermeyer).
- The DrawBitmap() function now has a new parameter 'Overlay' that allows a bitmap
to be drawn with a transparent background (thanks to Alexander Hans).
+- Fixed cSchedule::GetFollowingEvent() in case there is currently no present event
+ running (thanks to Pekka Mauno).
diff --git a/epg.c b/epg.c
index a8328a8b..2f88af9a 100644
--- a/epg.c
+++ b/epg.c
@@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
*
- * $Id: epg.c 1.63 2006/02/26 13:54:44 kls Exp $
+ * $Id: epg.c 1.64 2006/02/26 15:07:17 kls Exp $
*/
#include "epg.h"
@@ -691,6 +691,13 @@ const cEvent *cSchedule::GetFollowingEvent(void) const
const cEvent *p = GetPresentEvent();
if (p)
p = events.Next(p);
+ else {
+ time_t now = time(NULL);
+ for (p = events.First(); p; p = events.Next(p)) {
+ if (p->StartTime() >= now)
+ break;
+ }
+ }
return p;
}