Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

applications: nrf_desktop: Fix returning error in MCUmgr callbacks #11964

Merged
merged 1 commit into from
Aug 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions applications/nrf_desktop/src/modules/dfu_mcumgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ static enum mgmt_cb_return mcumgr_img_mgmt_cb(uint32_t event,
k_work_reschedule(&dfu_timeout, DFU_TIMEOUT);
if (IS_ENABLED(CONFIG_DESKTOP_DFU_LOCK) && dfu_lock_claim(&mcumgr_owner)) {
(void)k_work_cancel_delayable(&dfu_timeout);
return MGMT_ERR_EACCESSDENIED;
*rc = MGMT_ERR_EACCESSDENIED;
MarekPieta marked this conversation as resolved.
Show resolved Hide resolved
return MGMT_CB_ERROR_RC;
}

if (IS_ENABLED(CONFIG_MCUMGR_TRANSPORT_BT) &&
Expand All @@ -96,7 +97,8 @@ static enum mgmt_cb_return mcumgr_os_mgmt_reset_cb(uint32_t event,
k_work_reschedule(&dfu_timeout, DFU_TIMEOUT);
if (IS_ENABLED(CONFIG_DESKTOP_DFU_LOCK) && dfu_lock_claim(&mcumgr_owner)) {
(void)k_work_cancel_delayable(&dfu_timeout);
return MGMT_ERR_EACCESSDENIED;
*rc = MGMT_ERR_EACCESSDENIED;
return MGMT_CB_ERROR_RC;
}

return MGMT_CB_OK;
Expand Down
Loading