aboutsummaryrefslogtreecommitdiff
path: root/lib/dvb/dvbtime.cpp
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-02-25 02:04:46 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-02-25 02:04:46 +0000
commit672b1ef9c238b94bd46f17020557780745f0db18 (patch)
treef7bf14e3c5ebd9359de692e956dc8afbbf19b289 /lib/dvb/dvbtime.cpp
parent673d85e4aace04805fe958bbe8cb741b21ccbc1b (diff)
downloadenigma2-672b1ef9c238b94bd46f17020557780745f0db18.tar.gz
enigma2-672b1ef9c238b94bd46f17020557780745f0db18.zip
use reentrant version of localtime
Diffstat (limited to 'lib/dvb/dvbtime.cpp')
-rw-r--r--lib/dvb/dvbtime.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/dvb/dvbtime.cpp b/lib/dvb/dvbtime.cpp
index 3bd0a78d..dff5c0c9 100644
--- a/lib/dvb/dvbtime.cpp
+++ b/lib/dvb/dvbtime.cpp
@@ -189,14 +189,15 @@ void eDVBLocalTimeHandler::updateTime( time_t tp_time, eDVBChannel *chan, int up
time_t rtc_time = getRTC();
if ( rtc_time ) // RTC Ready?
{
- tm now = *localtime(&rtc_time);
+ tm now;
+ localtime_r(&rtc_time, &now);
eDebug("[eDVBLocalTimerHandler] RTC time is %02d:%02d:%02d",
now.tm_hour,
now.tm_min,
now.tm_sec);
time_t linuxTime=time(0);
time_t nowTime=linuxTime+m_time_difference;
- now = *localtime(&nowTime);
+ localtime_r(&nowTime, &now);
eDebug("[eDVBLocalTimerHandler] Receiver time is %02d:%02d:%02d",
now.tm_hour,
now.tm_min,
@@ -313,7 +314,8 @@ void eDVBLocalTimeHandler::updateTime( time_t tp_time, eDVBChannel *chan, int up
return;
}
- tm now = *localtime(&t);
+ tm now;
+ localtime_r(&t, &now);
eDebug("[eDVBLocalTimerHandler] time update to %02d:%02d:%02d",
now.tm_hour,
now.tm_min,