From 7b25497cc8f70169cf92389e6716840b0ffeceaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?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. --- mesh/appkey.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesh/appkey.c b/mesh/appkey.c index 45d604007..a4771bd7d 100644 --- a/mesh/appkey.c +++ b/mesh/appkey.c @@ -320,7 +320,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.47.3