Skip to content

Commit

Permalink
lte/alt1250: Fix lifetime value length
Browse files Browse the repository at this point in the history
The lifetime value must be 32 bit unsigned length.
  • Loading branch information
SPRESENSE committed Dec 7, 2022
1 parent b6c810b commit 8e5e64c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/lte/lte_lwm2m.h
Expand Up @@ -227,7 +227,7 @@ struct lwm2mstub_serverinfo_s
bool bootstrap;
bool nonip;
int security_mode;
unsigned short lifetime;
uint32_t lifetime;
char server_uri[LWM2MSTUB_MAX_SERVER_NAME];
char device_id[LWM2MSTUB_MAX_DEVID];
char security_key[LWM2MSTUB_MAX_SEQKEY];
Expand Down
2 changes: 1 addition & 1 deletion lte/alt1250/alt1250_atcmd.c
Expand Up @@ -672,7 +672,7 @@ int lwm2mstub_send_bscreateobj1(FAR struct alt1250_s *dev,
FAR struct lwm2mstub_serverinfo_s *info)
{
snprintf((char *)dev->tx_buff, _TX_BUFF_SIZE,
"AT%%LWM2MBSCMD=\"CREATE\",1,0,0,0,1,%u,%s\r", info->lifetime,
"AT%%LWM2MBSCMD=\"CREATE\",1,0,0,0,1,%lu,%s\r", info->lifetime,
info->nonip ? ",7,\"N\",22,\"N\"" : "");

return send_internal_at_command(dev, container, usockid, proc, arg, ures);
Expand Down

0 comments on commit 8e5e64c

Please sign in to comment.