Skip to content

Commit

Permalink
[ymodem] fix the cmd "sy" without close file
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-LGF committed Apr 13, 2024
1 parent acf4487 commit 58ecde7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/utilities/ymodem/ry_sy.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,10 @@ static enum rym_code _rym_send_end(
rt_uint8_t *buf,
rt_size_t len)
{
struct custom_ctx *cctx = (struct custom_ctx *)ctx;
rt_memset(buf, 0, len);
close(cctx->fd);
cctx->fd = -1;

return RYM_CODE_SOH;
}
Expand Down

0 comments on commit 58ecde7

Please sign in to comment.