From: kibak.yoon Date: Tue, 7 Jun 2016 05:02:41 +0000 (+0900) Subject: sensord: set to UINT_MAX batch count when there is no batch latency for sensor X-Git-Tag: accepted/tizen/common/20160627.191141~1^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F02%2F75602%2F1;p=platform%2Fcore%2Fsystem%2Fsensord.git 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 --- 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);