From: Vitaliy Cherepanov Date: Tue, 22 Oct 2013 09:53:45 +0000 (+0400) Subject: [FIX] failed start_profiling leaves us inst run X-Git-Tag: Tizen_SDK_2.3~153 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c7418bfb574ec7dcd698eb923a2469a5e40e66a9;p=platform%2Fcore%2Fsystem%2Fswap-manager.git [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 --- 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;