From eddabbaa0ae9b091bdb7e28278d7e0c7e06a8c87 Mon Sep 17 00:00:00 2001 From: Kacper Radoszewski Date: Fri, 7 Jun 2024 13:20:06 +0200 Subject: [PATCH] applications: samples: add handling for LWM2M_CARRIER_ERROR_CONNECT This new error type was introduced in the latest release of the LwM2M Carrier library but not all the existing integrations have been updated to handle it. Signed-off-by: Kacper Radoszewski --- applications/asset_tracker_v2/src/modules/modem_module.c | 2 ++ samples/cellular/http_update/application_update/src/main.c | 2 ++ samples/cellular/lwm2m_carrier/src/main.c | 2 ++ samples/cellular/modem_shell/src/shell.c | 2 ++ 4 files changed, 8 insertions(+) diff --git a/applications/asset_tracker_v2/src/modules/modem_module.c b/applications/asset_tracker_v2/src/modules/modem_module.c index 29fea5db1df..2134c2ccfc1 100644 --- a/applications/asset_tracker_v2/src/modules/modem_module.c +++ b/applications/asset_tracker_v2/src/modules/modem_module.c @@ -338,6 +338,8 @@ static void print_carrier_error(const lwm2m_carrier_event_t *evt) "Initialization failure", [LWM2M_CARRIER_ERROR_RUN] = "Configuration failure", + [LWM2M_CARRIER_ERROR_CONNECT] = + "Connection failure", }; __ASSERT(PART_OF_ARRAY(strerr, &strerr[err->type]), "Unhandled carrier library error"); diff --git a/samples/cellular/http_update/application_update/src/main.c b/samples/cellular/http_update/application_update/src/main.c index a8663c13546..cbcb5b36d14 100644 --- a/samples/cellular/http_update/application_update/src/main.c +++ b/samples/cellular/http_update/application_update/src/main.c @@ -401,6 +401,8 @@ static void print_err(const lwm2m_carrier_event_t *evt) "Initialization failure", [LWM2M_CARRIER_ERROR_RUN] = "Configuration failure", + [LWM2M_CARRIER_ERROR_CONNECT] = + "Connection failure", }; printk("%s, reason %d\n", strerr[err->type], err->value); diff --git a/samples/cellular/lwm2m_carrier/src/main.c b/samples/cellular/lwm2m_carrier/src/main.c index 2eab59ed68c..e1b80367438 100644 --- a/samples/cellular/lwm2m_carrier/src/main.c +++ b/samples/cellular/lwm2m_carrier/src/main.c @@ -79,6 +79,8 @@ void print_err(const lwm2m_carrier_event_t *evt) "Initialization failure", [LWM2M_CARRIER_ERROR_RUN] = "Configuration failure", + [LWM2M_CARRIER_ERROR_CONNECT] = + "Connection failure", }; __ASSERT(PART_OF_ARRAY(strerr[err->type]), diff --git a/samples/cellular/modem_shell/src/shell.c b/samples/cellular/modem_shell/src/shell.c index 949d22303b6..ef352463553 100644 --- a/samples/cellular/modem_shell/src/shell.c +++ b/samples/cellular/modem_shell/src/shell.c @@ -60,6 +60,8 @@ void lwm2m_handle_error(const lwm2m_carrier_event_t *evt) "Initialization failure", [LWM2M_CARRIER_ERROR_RUN] = "Configuration failure", + [LWM2M_CARRIER_ERROR_CONNECT] = + "Connection failure", }; mosh_error("%s, reason %d\n", strerr[err->type], err->value);