From 06bf4c453e22a9bf03f5ec46f7b45593e2cb326c Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 23 Aug 2009 16:04:00 +0200 Subject: Version 1.7.9 - Fixed storing the current OSD size in case the device has changed it in its setup menu (reported by Reinhard Nissl). - Fixed cDevice::PlayTsVideo() and cDevice::PlayTsAudio() in case only part of the buffer has been accepted by the device (reported by Udo Richter). - Changed the EIT filter setup to save a few handles on devices that do hardware filtering. - Fixed deleting expired timers if they have the VPS flag set, but the event they are assigned to doesn't have a VPS tag. - Fixed handling file name length on VFAT systems in case they contain UTF-8 characters (thanks to Rolf Ahrenberg). - Fixed generating CaPmts in case audio and video are encrypted using different ECM pids. - Updated vdr.1 to use the new file names in recording directories. - Fixed cRecordings::DelByName() to avoid compilation errors with gcc 4.4 (thanks to Matthias Schwarzott). - Increased the value of MAXFRAMESIZE to better suit HD recordings (thanks to Reinhard Nissl). - Implemented full handling of subtitling descriptors (thanks to Mikko Tuumanen). --- timers.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'timers.c') diff --git a/timers.c b/timers.c index b963dee..a684bb4 100644 --- a/timers.c +++ b/timers.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: timers.c 2.1 2008/04/13 12:41:41 kls Exp $ + * $Id: timers.c 2.3 2009/08/09 12:43:20 kls Exp $ */ #include "timers.h" @@ -51,6 +51,11 @@ cTimer::cTimer(bool Instant, bool Pause, cChannel *Channel) event = NULL; if (Instant && channel) snprintf(file, sizeof(file), "%s%s", Setup.MarkInstantRecord ? "@" : "", *Setup.NameInstantRecord ? Setup.NameInstantRecord : channel->Name()); + if (VfatFileSystem && (Utf8StrLen(file) > VFAT_MAX_FILENAME)) { + dsyslog("timer file name too long for VFAT file system: '%s'", file); + file[Utf8SymChars(file, VFAT_MAX_FILENAME)] = 0; + dsyslog("timer file name truncated to '%s'", file); + } } cTimer::cTimer(const cEvent *Event) @@ -83,6 +88,11 @@ cTimer::cTimer(const cEvent *Event) const char *Title = Event->Title(); if (!isempty(Title)) Utf8Strn0Cpy(file, Event->Title(), sizeof(file)); + if (VfatFileSystem && (Utf8StrLen(file) > VFAT_MAX_FILENAME)) { + dsyslog("timer file name too long for VFAT file system: '%s'", file); + file[Utf8SymChars(file, VFAT_MAX_FILENAME)] = 0; + dsyslog("timer file name truncated to '%s'", file); + } aux = NULL; event = NULL; // let SetEvent() be called to get a log message } @@ -296,13 +306,13 @@ bool cTimer::Parse(const char *s) p++; else p = filebuffer; - if (strlen(p) > VFAT_MAX_FILENAME) { + if (Utf8StrLen(p) > VFAT_MAX_FILENAME) { dsyslog("timer file name too long for VFAT file system: '%s'", p); - p[VFAT_MAX_FILENAME] = 0; + p[Utf8SymChars(p, VFAT_MAX_FILENAME)] = 0; dsyslog("timer file name truncated to '%s'", p); } } - Utf8Strn0Cpy(file, filebuffer, MaxFileName); + Utf8Strn0Cpy(file, filebuffer, sizeof(file)); strreplace(file, '|', ':'); if (isnumber(channelbuffer)) channel = Channels.GetByNumber(atoi(channelbuffer)); @@ -463,7 +473,7 @@ int cTimer::Matches(const cEvent *Event, int *Overlap) const bool cTimer::Expired(void) const { - return IsSingleEvent() && !Recording() && StopTime() + EXPIRELATENCY <= time(NULL) && (!HasFlags(tfVps) || !event); + return IsSingleEvent() && !Recording() && StopTime() + EXPIRELATENCY <= time(NULL) && (!HasFlags(tfVps) || !event || !event->Vps()); } time_t cTimer::StartTime(void) const -- cgit v1.2.3