Skip to content

Commit

Permalink
applications: asset_tracker_v2: Replace hardcoded value with HW_ID_LEN
Browse files Browse the repository at this point in the history
Replace hardcoded client ID with `HW_ID_LEN` to avoid truncating
if HW ID library is configured to output IDs longer than 15 characters.

Fixes NCSDK-24219

Signed-off-by: Simen S. Røstad <[email protected]>
  • Loading branch information
simensrostad authored and cvinayak committed Oct 24, 2023
1 parent ea0eaae commit 61d24c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
LOG_MODULE_REGISTER(MODULE, CONFIG_CLOUD_INTEGRATION_LOG_LEVEL);

#if !defined(CONFIG_CLOUD_CLIENT_ID_USE_CUSTOM)
#define AWS_CLOUD_CLIENT_ID_LEN 15
#define AWS_CLOUD_CLIENT_ID_LEN (HW_ID_LEN - 1)
#else
#define AWS_CLOUD_CLIENT_ID_LEN (sizeof(CONFIG_CLOUD_CLIENT_ID) - 1)
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
LOG_MODULE_REGISTER(MODULE, CONFIG_CLOUD_INTEGRATION_LOG_LEVEL);

#if !defined(CONFIG_CLOUD_CLIENT_ID_USE_CUSTOM)
#define LWM2M_INTEGRATION_CLIENT_ID_LEN 15
#define LWM2M_INTEGRATION_CLIENT_ID_LEN (HW_ID_LEN - 1)
#else
#define LWM2M_INTEGRATION_CLIENT_ID_LEN (sizeof(CONFIG_CLOUD_CLIENT_ID) - 1)
#endif
Expand Down

0 comments on commit 61d24c0

Please sign in to comment.