samples: net: lwm2m_client: Remove unneeded Security object instance

The second Security object instance for bootstrap case isn't really
needed, as the bootstrap server creates own Security object instances
anyway. As that object instance had no Short Server ID assigned, it
caused failures during bootstrap discovery.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
Robert Lubos 2024-09-06 10:39:32 +02:00 committed by Carles Cufí
commit 3e5b878102

View file

@ -127,9 +127,6 @@ static int lwm2m_setup(void)
#if defined(CONFIG_LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP)
/* Mark 1st instance of security object as a bootstrap server */
lwm2m_set_u8(&LWM2M_OBJ(0, 0, 1), 1);
/* Create 2nd instance of security object needed for bootstrap */
lwm2m_create_object_inst(&LWM2M_OBJ(0, 1));
#else
/* Match Security object instance with a Server object instance with
* Short Server ID.