From c7418bfb574ec7dcd698eb923a2469a5e40e66a9 Mon Sep 17 00:00:00 2001 From: Vitaliy Cherepanov Date: Tue, 22 Oct 2013 13:53:45 +0400 Subject: [PATCH] [FIX] failed start_profiling leaves us inst run if US profiling have been started in kernel but we have some problems in da_manager with start profiling we must stop profiling to avail accept and proceed next start message Change-Id: I2b542b98451498f8845d1243909529b9db6030ea Signed-off-by: Vitaliy Cherepanov --- daemon/da_protocol.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/daemon/da_protocol.c b/daemon/da_protocol.c index 5b621c7..66e7d96 100644 --- a/daemon/da_protocol.c +++ b/daemon/da_protocol.c @@ -968,6 +968,10 @@ static int process_msg_start(struct msg_buf_t *msg_control) if (start_profiling() < 0) { LOGE("cannot start profiling\n"); + if (stop_all() != ERR_NO) { + LOGE("Stop failed\n"); + write_msg_error("Stop failed"); + } goto send_ack; } @@ -1004,8 +1008,10 @@ int host_message_handler(struct msg_t *msg) return process_msg_start(&msg_control); case NMSG_STOP: sendACKToHost(msg->id, ERR_NO, 0, 0); - if (stop_all() != ERR_NO) + if (stop_all() != ERR_NO) { + LOGE("Stop failed\n"); write_msg_error("Stop failed"); + } break; case NMSG_CONFIG: error_code = ERR_NO; -- 2.7.4