mgmt: mcumgr: callback: Add op to receive callback
Adds the operation supplied by the client to the MCUmgr command received callback Signed-off-by: Jamie McCrae <spam@helper3000.net>
This commit is contained in:
parent
0c095898fb
commit
a48a594f13
2 changed files with 4 additions and 1 deletions
|
|
@ -251,6 +251,9 @@ struct mgmt_evt_op_cmd_arg {
|
|||
uint8_t id;
|
||||
|
||||
union {
|
||||
/** #mcumgr_op_t used in #MGMT_EVT_OP_CMD_RECV */
|
||||
uint8_t op;
|
||||
|
||||
/** #mcumgr_err_t, used in #MGMT_EVT_OP_CMD_DONE */
|
||||
int err;
|
||||
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ static int smp_handle_single_payload(struct smp_streamer *cbuf, const struct smp
|
|||
#if defined(CONFIG_MCUMGR_SMP_COMMAND_STATUS_HOOKS)
|
||||
cmd_recv.group = req_hdr->nh_group;
|
||||
cmd_recv.id = req_hdr->nh_id;
|
||||
cmd_recv.err = MGMT_ERR_EOK;
|
||||
cmd_recv.op = req_hdr->nh_op;
|
||||
|
||||
/* Send request to application to check if handler should run or not. */
|
||||
status = mgmt_callback_notify(MGMT_EVT_OP_CMD_RECV, &cmd_recv, sizeof(cmd_recv),
|
||||
|
|
|
|||
Loading…
Reference in a new issue