for (l = services; NULL != l; l = g_slist_next(l)) {
service = l->data;
+ UAM_DBG("service: %p, monitors: %p", service, service->monitors);
if (!service || !service->monitors)
continue;
- if (0 == service->remaining_time) {
+ UAM_DBG("service->remaining_time: %d", service->remaining_time);
+ service->remaining_time -= UAM_DETECTION_CYCLE_MIN;
+ if (0 >= service->remaining_time) {
start_detection = TRUE;
service->remaining_time = service->cycle;
- } else
- service->remaining_time -= UAM_DETECTION_CYCLE_MIN;
+ }
}
if (!start_detection)