mgmt: mcumgr: transport: dummy: Fix issue with large packets
Fixes an issue with large packets being received, these packets are chunked into 127-byte frames for the serial transport but this system is not needed for the dummy transport as it has a fixed size buffer. Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This commit is contained in:
parent
43b4350744
commit
5d8c79f064
1 changed files with 2 additions and 1 deletions
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
/* Define required for uart_mcumgr.h functionality reuse */
|
/* Define required for uart_mcumgr.h functionality reuse */
|
||||||
#define CONFIG_UART_MCUMGR_RX_BUF_SIZE CONFIG_MCUMGR_SMP_DUMMY_RX_BUF_SIZE
|
#define CONFIG_UART_MCUMGR_RX_BUF_SIZE CONFIG_MCUMGR_SMP_DUMMY_RX_BUF_SIZE
|
||||||
|
#define MCUMGR_DUMMY_MAX_FRAME CONFIG_MCUMGR_SMP_DUMMY_RX_BUF_SIZE
|
||||||
|
|
||||||
#include <zephyr/kernel.h>
|
#include <zephyr/kernel.h>
|
||||||
#include <zephyr/init.h>
|
#include <zephyr/init.h>
|
||||||
|
@ -581,7 +582,7 @@ int mcumgr_dummy_tx_frame(const uint8_t *data, bool first, int len,
|
||||||
}
|
}
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
if (dst_off >= MCUMGR_SERIAL_MAX_FRAME - 4) {
|
if (dst_off >= MCUMGR_DUMMY_MAX_FRAME - 4) {
|
||||||
/* Can't fit any more data in this frame. */
|
/* Can't fit any more data in this frame. */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue