Skip to content

Conversation

@nordicjm
Copy link
Contributor

Fixes an issue when using custom payloads where the size was still using the zcbor buffer instead of the size of the network buffer

Fixes #85521

Fixes an issue when using custom payloads where the size was still
using the zcbor buffer instead of the size of the network buffer

Signed-off-by: Jamie McCrae <[email protected]>
Comment on lines +313 to +319
#if defined(CONFIG_MCUMGR_MGMT_CUSTOM_PAYLOAD)
if (!mgmt_find_group(req_hdr->nh_group)->custom_payload) {
#endif
nbw->nb->len = zsp->payload_mut - nbw->nb->data;
#if defined(CONFIG_MCUMGR_MGMT_CUSTOM_PAYLOAD)
}
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this increases readability

	if (COND_CODE_1(CONFIG_MCUMGR_MGMT_CUSTOM_PAYLOAD,
	    (!mgmt_find_group(req_hdr->nh_group)->custom_payload), (true))) {
		nbw->nb->len = zsp->payload_mut - nbw->nb->data;
	}

@kartben kartben merged commit 13ac8fe into zephyrproject-rtos:main Feb 13, 2025
25 checks passed
@nordicjm nordicjm deleted the fixcustomsmp branch February 26, 2025 10:40
@shurik3313
Copy link

Can you make these changes in version 3.7.1?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: mcumgr backport v3.7-branch Request backport to the v3.7-branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue with User-Defined Payload Transmission Over SMP: Payload Length Calculation and Memory Address Handling

6 participants