From 8fe04eb190fda9eb38b93150f9140837d865915c Mon Sep 17 00:00:00 2001 From: "kibak.yoon" Date: Tue, 7 Jun 2016 14:02:41 +0900 Subject: [PATCH] sensord: set to UINT_MAX batch count when there is no batch latency for sensor - if there is no client which uses batch latency, batch count should be set the default value, not 0 but max batch count. if sensord sets the UINT_MAX as a default value, HAL will set the proper value comparing between this sensor's max batch count and UINT_MAX. Change-Id: I3aff8d24c00ca6b232d33c803b1783cb60325abb Signed-off-by: kibak.yoon --- src/server/sensor_base.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/server/sensor_base.cpp b/src/server/sensor_base.cpp index 5ff2566..a5a40bb 100644 --- a/src/server/sensor_base.cpp +++ b/src/server/sensor_base.cpp @@ -18,6 +18,7 @@ */ #include +#include #include #include #include @@ -264,10 +265,10 @@ bool sensor_base::delete_batch(int client_id) cur_max = m_sensor_info_list.get_max_batch(); if (!cur_max) { - _I("No latency for sensor[%#llx] by client[%d] deleting latency, so set to default 0 ms", + _I("No latency for sensor[%#llx] by client[%d] deleting latency, so set to default count", get_id(), client_id); - set_batch_latency(0); + set_batch_latency(UINT_MAX); } else if (cur_max != prev_max) { _I("Max latency for sensor[%#llx] is changed from %dms to %dms by client[%d] deleting latency", get_id(), prev_max, cur_max, client_id); -- 2.7.4