From e743d89cdc7baf1c30328c4330c5a67d23cf4619 Mon Sep 17 00:00:00 2001 From: Michael Scott Date: Sat, 17 Aug 2019 10:05:55 -0700 Subject: [PATCH] net: lwm2m: add missing bootstrap-finish handling When the bootstrap support was added, it looks like I somehow missed the handling block in the engine. Let's add it now to fix boostrap support. Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/18080 Signed-off-by: Michael Scott --- subsys/net/lib/lwm2m/lwm2m_engine.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/subsys/net/lib/lwm2m/lwm2m_engine.c b/subsys/net/lib/lwm2m/lwm2m_engine.c index b4e4c285892..e8ce9a4e614 100644 --- a/subsys/net/lib/lwm2m/lwm2m_engine.c +++ b/subsys/net/lib/lwm2m/lwm2m_engine.c @@ -3312,6 +3312,13 @@ static int handle_request(struct coap_packet *request, } well_known = true; +#if defined(CONFIG_LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP) + /* check for bootstrap-finish */ + } else if ((code & COAP_REQUEST_MASK) == COAP_METHOD_POST && r == 1 && \ + strncmp(options[0].value, "bs", options[0].len) == 0) { + engine_bootstrap_finish(); + return 0; +#endif } else { r = coap_options_to_path(options, r, &msg->path); if (r < 0) {