if no application avail for profiling we should stop profiling
Change-Id: I3994271ab20121cdbae08d66c49ba65a21aa8f02
Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
setEmptyTargetSlot(index);
// all target client are closed
- if (0 == __sync_sub_and_fetch(&manager.target_count, 1))
+ if (0 == __sync_sub_and_fetch(&manager.target_count, 1)) {
+ LOGI("all targets are stopped\n");
+ if (stop_all() != ERR_NO)
+ LOGE("Stop failed\n");
return -11;
+ }
return 0;
}
if (msg & EVENT_STOP || msg & EVENT_ERROR)
err = target_event_stop_handler(epollfd, index, msg);
- return 0;
+ return err;
}
#ifndef LOCALTEST