Skip to content

Commit a16fb23

Browse files
SPRESENSEpkarashchenko
authored andcommitted
lte/alt1250: Notice instance information
Notice instance information of LwM2M server operation to application.
1 parent c82aa9f commit a16fb23

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

include/lte/lte_lwm2m.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ typedef CODE void (*lwm2mstub_ovstart_cb_t)(int seq_no, int srv_id,
250250
typedef CODE void (*lwm2mstub_ovstop_cb_t)(int seq_no, int srv_id,
251251
FAR struct lwm2mstub_instance_s *inst, FAR char *token);
252252

253-
typedef CODE void (*lwm2mstub_operation_cb_t)(int event);
253+
typedef CODE void (*lwm2mstub_operation_cb_t)(int event, int srv_id,
254+
FAR struct lwm2mstub_instance_s *inst);
254255

255256
typedef CODE void (*lwm2mstub_fwupstate_cb_t)(int event);
256257

lte/alt1250/callback_handlers/alt1250_evt.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -638,9 +638,10 @@ static FAR void *g_lwm2movstopargs[] =
638638

639639
/* event argument for LTE_CMDID_LWM2M_SERVEROP_EVT */
640640

641+
static struct lwm2mstub_instance_s g_lwm2msrvop_inst;
641642
static FAR void *g_lwm2moperationargs[] =
642643
{
643-
NULL
644+
NULL, NULL, &g_lwm2msrvop_inst
644645
};
645646

646647
/* event argument for LTE_CMDID_LWM2M_FWUP_EVT */
@@ -1445,7 +1446,8 @@ static uint64_t lwm2m_operation_evt_cb(FAR void *cb, FAR void **cbarg,
14451446

14461447
if (callback)
14471448
{
1448-
callback((int)cbarg[0]);
1449+
callback((int)cbarg[0], (int)cbarg[1],
1450+
(FAR struct lwm2mstub_instance_s *)cbarg[2]);
14491451
}
14501452

14511453
return 0ULL;

0 commit comments

Comments
 (0)