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

Fixed a misplaced ')' in the fix about the stale lock files

This commit is contained in:
Klaus Schmidinger 2002-11-24 20:18:55 +01:00
parent 161b963fc5
commit 4ab777e98a
2 changed files with 4 additions and 2 deletions

View File

@ -1817,3 +1817,5 @@ Video Disk Recorder Revision History
- Fixed missing initialization of 'number' in cChannel (thanks to Martin Hammerschmid
for reporting this one).
- Fixed a misplaced ')' in the fix about the stale lock files (thanks again to
Oliver Endriss for pointing this out - it was my fault).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: tools.c 1.75 2002/11/24 16:04:57 kls Exp $
* $Id: tools.c 1.76 2002/11/24 20:17:31 kls Exp $
*/
#include "tools.h"
@ -722,7 +722,7 @@ bool cLockFile::Lock(int WaitSeconds)
if (errno == EEXIST) {
struct stat fs;
if (stat(fileName, &fs) == 0) {
if (abs(time(NULL)) - fs.st_mtime > LOCKFILESTALETIME) {
if (abs(time(NULL) - fs.st_mtime) > LOCKFILESTALETIME) {
esyslog("ERROR: removing stale lock file '%s'", fileName);
if (remove(fileName) < 0) {
LOG_ERROR_STR(fileName);