From 6ae0cb4e24ee1f4f9c4f4c02df0a917c0fdf512d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20Lowas-Rzechonek?= Date: Thu, 6 Aug 2020 16:13:09 +0200 Subject: [PATCH] mesh: Allow deleting non-existing app key Mesh Profile v1.0.1, section 4.3.2.40 Config AppKey Status (...) The Status Code shall be Success if the received request was redundant (add of an identical existing key, update of an identical updated key, or delete of a non-existent key), with no further action taken. Change-Id: Ib85ca021261c77b49a5d9d6bc3ee7f2955e8b9b5 Signed-off-by: anuj.bhumiya --- mesh/appkey.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesh/appkey.c b/mesh/appkey.c index 74ee32d..f19f46f 100644 --- a/mesh/appkey.c +++ b/mesh/appkey.c @@ -319,7 +319,7 @@ int appkey_key_delete(struct mesh_net *net, uint16_t net_idx, key = l_queue_find(app_keys, match_key_index, L_UINT_TO_PTR(app_idx)); if (!key) - return MESH_STATUS_INVALID_APPKEY; + return MESH_STATUS_SUCCESS; if (key->net_idx != net_idx) return MESH_STATUS_INVALID_NETKEY; -- 2.7.4