diff options
-rw-r--r-- | p2pvr/daemon/maintenance.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/p2pvr/daemon/maintenance.cpp b/p2pvr/daemon/maintenance.cpp index 58d9dc2..ea21a13 100644 --- a/p2pvr/daemon/maintenance.cpp +++ b/p2pvr/daemon/maintenance.cpp @@ -71,19 +71,21 @@ MaintenanceI::ScheduledUpdate() AdHoc::ScopeExit notRunning([this]{ updateRunning = false; }); updateRunning = true; time_t now = time(NULL); + auto maint = Ice::checkedCast<MaintenancePrx>(adapter->createProxy(Ice::stringToIdentity("Maintenance"))); + if (lastUpdateNetwork < now - options->periodUpdateNetwork) { logger->messagebf(LogLevel::INFO, "%s: updating network", __PRETTY_FUNCTION__); - this->UpdateNetwork(FE_OFDM, Ice::Current()); + maint->UpdateNetwork(FE_OFDM); time(&lastUpdateNetwork); } if (lastUpdateServices < now - options->periodUpdateServices) { logger->messagebf(LogLevel::INFO, "%s: updating services", __PRETTY_FUNCTION__); - this->UpdateServices(Ice::Current()); + maint->UpdateServices(); time(&lastUpdateServices); } if (lastUpdateEvents < now - options->periodUpdateEvents) { logger->messagebf(LogLevel::INFO, "%s: updating events", __PRETTY_FUNCTION__); - this->UpdateEvents(Ice::Current()); + maint->UpdateEvents(); time(&lastUpdateEvents); } logger->messagebf(LogLevel::DEBUG, "%s: completed", __PRETTY_FUNCTION__); |