diff options
Diffstat (limited to 'apps/system/zmodem/zm_state.c')
-rw-r--r-- | apps/system/zmodem/zm_state.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/system/zmodem/zm_state.c b/apps/system/zmodem/zm_state.c index 261dba388..be0285d85 100644 --- a/apps/system/zmodem/zm_state.c +++ b/apps/system/zmodem/zm_state.c @@ -56,6 +56,7 @@ #include <unistd.h> #include <string.h> #include <ctype.h> +#include <ctype.h> #include <fcntl.h> #include <sched.h> #include <assert.h> @@ -641,9 +642,13 @@ static int zm_data(FAR struct zm_state_s *pzm, uint8_t ch) /* Make sure that there is space for another byte in the packet buffer */ - if (pzm->pktlen >= CONFIG_SYSTEM_ZMODEM_PKTBUFSIZE) + if (pzm->pktlen >= ZM_PKTBUFSIZE) { zmdbg("ERROR: The packet buffer is full\n"); + zmdbg(" ch=%c[%02x] pktlen=%d ptktype=%02x ncrc=%d\n", + isprint(ch) ? ch : '.', ch, pzm->pktlen, pzm->pkttype, pzm->ncrc); + zmdbg(" rcvlen=%d rcvndx=%d\n", + pzm->rcvlen, pzm->rcvndx); return -ENOSPC; } |