diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-06-18 00:25:45 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-06-18 00:25:45 +0100 |
commit | 3d154e756d61d8617bb8023eb552b5e4faab2a74 (patch) | |
tree | a887a65f8699e7dbf46e8d50c25b575e50d498b2 /p2pvr/daemon/maintenance.cpp | |
parent | Merge branch 'netfs-test-refactor' (diff) | |
parent | Compatibility with AppInstance and ExecContext changes (diff) | |
download | p2pvr-3d154e756d61d8617bb8023eb552b5e4faab2a74.tar.bz2 p2pvr-3d154e756d61d8617bb8023eb552b5e4faab2a74.tar.xz p2pvr-3d154e756d61d8617bb8023eb552b5e4faab2a74.zip |
Merge branch 'p2pvr'
Diffstat (limited to 'p2pvr/daemon/maintenance.cpp')
-rw-r--r-- | p2pvr/daemon/maintenance.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/p2pvr/daemon/maintenance.cpp b/p2pvr/daemon/maintenance.cpp index 8e204f7..928e8d9 100644 --- a/p2pvr/daemon/maintenance.cpp +++ b/p2pvr/daemon/maintenance.cpp @@ -29,7 +29,9 @@ Maintenance::Maintenance(Ice::ObjectAdapterPtr a, IceUtil::TimerPtr t) : lastUpdateEvents(0), updateRunning(false) { - timer->scheduleRepeated(clientCheck, IceUtil::Time::seconds(5 * 60)); + if (timer) { + timer->scheduleRepeated(clientCheck, IceUtil::Time::seconds(5 * 60)); + } #ifdef NDEBUG ScheduledUpdate(); #endif @@ -48,8 +50,8 @@ void Maintenance::UpdateAll(short type, const Ice::Current & ice) { UpdateNetwork(type, ice); - UpdateServices(type, ice); - UpdateEvents(type, ice); + UpdateServices(ice); + UpdateEvents(ice); } void @@ -70,12 +72,12 @@ Maintenance::ScheduledUpdate() } if (lastUpdateServices < now - periodUpdateServices) { Logger()->messagebf(LOG_INFO, "%s: updating services", __PRETTY_FUNCTION__); - si->UpdateServices(FE_OFDM); + si->UpdateServices(); time(&lastUpdateServices); } if (lastUpdateEvents < now - periodUpdateEvents) { Logger()->messagebf(LOG_INFO, "%s: updating events", __PRETTY_FUNCTION__); - si->UpdateEvents(FE_OFDM); + si->UpdateEvents(); time(&lastUpdateEvents); } Logger()->messagebf(LOG_DEBUG, "%s: completed", __PRETTY_FUNCTION__); |