summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYunchan Cho <yunchan.cho@samsung.com>2013-05-15 18:25:16 +0900
committerYunchan Cho <yunchan.cho@samsung.com>2013-05-15 18:45:41 +0900
commit4786cf139e3cfc85ff7f0d71ae9e8a6a50dfb810 (patch)
tree7aec84da78f505b013ba67cd3136999c17e3654d
parent0b2435244776e7011660d74665d295d44f9c95f6 (diff)
downloadweb-provider-4786cf139e3cfc85ff7f0d71ae9e8a6a50dfb810.tar.gz
web-provider-4786cf139e3cfc85ff7f0d71ae9e8a6a50dfb810.tar.bz2
web-provider-4786cf139e3cfc85ff7f0d71ae9e8a6a50dfb810.zip
Change-Id: Ib89c91343b7ef062e80e689dc32f2a20e318b991
-rw-r--r--packaging/livebox.web-provider.spec2
-rw-r--r--src/Core/BoxUpdateTimer.cpp9
-rw-r--r--src/Core/Service/PeriodChanger.cpp6
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 <Core/Util/Log.h>
#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 <Core/Util/Log.h>
#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;