From b4c291c0289f5c9399118eecd9170d92d696b996 Mon Sep 17 00:00:00 2001 From: Vitaliy Cherepanov Date: Tue, 15 Sep 2015 12:56:58 +0300 Subject: [PATCH] [FIX] ack for unknown message Change-Id: I548c0decfd50c063bfeec7f8a294ae8177662a2f Signed-off-by: Vitaliy Cherepanov --- daemon/da_msg_ids.h | 1 + daemon/da_protocol.c | 1 + 2 files changed, 2 insertions(+) diff --git a/daemon/da_msg_ids.h b/daemon/da_msg_ids.h index 4691343..4dfd74c 100644 --- a/daemon/da_msg_ids.h +++ b/daemon/da_msg_ids.h @@ -25,6 +25,7 @@ */ #define MSG_ID_LIST \ +X(NMSG_UNKNOWN, 0x0000) \ X(NMSG_VERSION, 0x0001) \ X(NMSG_START, 0x0002) \ X(NMSG_STOP, 0x0003) \ diff --git a/daemon/da_protocol.c b/daemon/da_protocol.c index 50f5689..db570a1 100644 --- a/daemon/da_protocol.c +++ b/daemon/da_protocol.c @@ -1468,6 +1468,7 @@ int host_message_handler(struct msg_t *msg) default: LOGE("unknown message %d <0x%08X>\n", msg->id, msg->id); error_code = ERR_WRONG_MESSAGE_TYPE; + msg->id = NMSG_UNKNOWN; goto send_ack; } -- 2.7.4