From 4786cf139e3cfc85ff7f0d71ae9e8a6a50dfb810 Mon Sep 17 00:00:00 2001 From: Yunchan Cho Date: Wed, 15 May 2013 18:25:16 +0900 Subject: [Release] livebox.web-provider-1.22.1 Change-Id: Ib89c91343b7ef062e80e689dc32f2a20e318b991 --- packaging/livebox.web-provider.spec | 2 +- src/Core/BoxUpdateTimer.cpp | 9 +++++++-- src/Core/Service/PeriodChanger.cpp | 6 +++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/packaging/livebox.web-provider.spec b/packaging/livebox.web-provider.spec index 3b448be..aee8c2a 100644 --- a/packaging/livebox.web-provider.spec +++ b/packaging/livebox.web-provider.spec @@ -1,6 +1,6 @@ Name: livebox.web-provider Summary: web framework for livebox -Version: 1.22 +Version: 1.22.1 Release: 1 Group: main/app License: Flora License, Version 1.1 diff --git a/src/Core/BoxUpdateTimer.cpp b/src/Core/BoxUpdateTimer.cpp index b503f89..ed60e8c 100644 --- a/src/Core/BoxUpdateTimer.cpp +++ b/src/Core/BoxUpdateTimer.cpp @@ -21,7 +21,7 @@ #include #include "BoxUpdateTimer.h" -#define UPDATE_TIME_MIN 60.0 +#define UPDATE_TIME_MIN 1800.0f BoxUpdateTimer::BoxUpdateTimer(float period, Ecore_Task_Cb callback, void* data) : m_period(period) @@ -39,10 +39,15 @@ BoxUpdateTimer::~BoxUpdateTimer() void BoxUpdateTimer::start() { - if (m_period < UPDATE_TIME_MIN) { + if (m_period <= 0.0f ) { return; } + if (m_period < UPDATE_TIME_MIN) { + LogD("reset to minimum period(%f)", UPDATE_TIME_MIN); + m_period = UPDATE_TIME_MIN; + } + if (m_timer) { stop(); } diff --git a/src/Core/Service/PeriodChanger.cpp b/src/Core/Service/PeriodChanger.cpp index 338d024..c754fb5 100644 --- a/src/Core/Service/PeriodChanger.cpp +++ b/src/Core/Service/PeriodChanger.cpp @@ -26,8 +26,8 @@ #include #include "PeriodChanger.h" -#define UPDATE_PERIOD_MIN 60.0 -#define UPDATE_PERIOD_HOUR 60.0 * 60.0 +#define UPDATE_PERIOD_MIN 1800.0f +#define UPDATE_PERIOD_HOUR 60.0 * 60.0 #define U_(str) dgettext("web-provider", str) namespace Service { @@ -81,7 +81,7 @@ bool PeriodChanger::change() if (m_requestedPeriod == 0) { newPeriod = 0.0; } else if (m_requestedPeriod > 0) { - if (m_requestedPeriod > UPDATE_PERIOD_MIN) { + if (m_requestedPeriod >= UPDATE_PERIOD_MIN) { newPeriod = m_requestedPeriod; } else { newPeriod = UPDATE_PERIOD_MIN; -- cgit v1.2.3