From f933b63d1f6cbee306dadfab12bdd70681152085 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 13 Apr 2008 11:47:41 +0200 Subject: Improved logging system time changes to avoid problems on slow systems under heavy load --- eit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'eit.c') diff --git a/eit.c b/eit.c index b38e3a8a..06eeddb2 100644 --- a/eit.c +++ b/eit.c @@ -8,7 +8,7 @@ * Robert Schneider and Rolf Hakenes . * Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg . * - * $Id: eit.c 1.126 2007/09/26 10:56:33 kls Exp $ + * $Id: eit.c 1.126.1.1 2008/04/13 11:46:38 kls Exp $ */ #include "eit.h" @@ -300,9 +300,9 @@ cTDT::cTDT(const u_char *Data) if (diff > 2) { mutex.Lock(); if (abs(diff - lastDiff) < 3) { - isyslog("System Time = %s (%ld)", *TimeToString(loctim), loctim); - isyslog("Local Time = %s (%ld)", *TimeToString(sattim), sattim); - if (stime(&sattim) < 0) + if (stime(&sattim) == 0) + isyslog("system time changed from %s (%ld) to %s (%ld)", *TimeToString(loctim), loctim, *TimeToString(sattim), sattim); + else esyslog("ERROR while setting system time: %m"); } lastDiff = diff; -- cgit v1.2.3