Change-Id: I799bbefcd8e5d5b110dc77594540e46ac614ae73
Signed-off-by: Anastasia Lyupa <a.lyupa@samsung.com>
+ running_status_on(&prof_session);
+
if (start_profiling() < 0) {
LOGE("cannot start profiling\n");
if (stop_all() != ERR_NO) {
if (start_profiling() < 0) {
LOGE("cannot start profiling\n");
if (stop_all() != ERR_NO) {
- running_status_on(&prof_session);
send_ack:
get_serialized_time(&serialized_time);
sendACKToHost(NMSG_START, err_code, (void *)&serialized_time,
send_ack:
get_serialized_time(&serialized_time);
sendACKToHost(NMSG_START, err_code, (void *)&serialized_time,
if(manager.sampling_thread != -1) // already started
return 1;
if(manager.sampling_thread != -1) // already started
return 1;
+ if (check_running_status(&prof_session) == 0) {
+ LOGI("try to start sampling when running_status is 0\n");
+ return 1;
+ }
+
if(pthread_create(&(manager.sampling_thread), NULL, samplingThread, NULL) < 0)
{
LOGE("Failed to create sampling thread\n");
if(pthread_create(&(manager.sampling_thread), NULL, samplingThread, NULL) < 0)
{
LOGE("Failed to create sampling thread\n");