[Fix] services receiving detection callback on every detection for connectivity sensors.
authorAbhay Agarwal <ay.agarwal@samsung.com>
Mon, 30 Sep 2019 08:18:05 +0000 (17:18 +0900)
committersaerome.kim <saerome.kim@samsung.com>
Mon, 30 Sep 2019 12:34:01 +0000 (21:34 +0900)
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
This patch fix the issue of services receiving detection callback after every detection.
After this patch services will only receive detection event only once in their detection cycle.
This patch does not affect the environmental sensors callback.

Change-Id: Idea2cf785dbe302c921ef18f67d70bc500896dbd

packaging/ua-manager.spec
ua-daemon/src/ua-manager-core.c

index c9a7704..eaa0d49 100644 (file)
@@ -1,6 +1,6 @@
 Name:       ua-manager
 Summary:    User awareness manager
-Version:    0.10.4
+Version:    0.10.5
 Release:    1
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
index c1b9470..605f312 100644 (file)
@@ -2451,6 +2451,12 @@ void __send_user_presence_event(uam_db_tech_info_t *tech, unsigned int sensor,
                if (!svc || !svc->monitors)
                        continue;
 
+               UAM_INFO("service [%s] remaining time [%d] cycle [%d]",
+                       svc->name, svc->remaining_time, svc->cycle);
+
+               if (!(svc->remaining_time == svc->cycle))
+                       continue;
+
                for (l1 = svc->monitors; NULL != l1; l1 = g_slist_next(l1)) {
                        uam_monitor_info_t *mon = l1->data;