diff options
| author | Eric LGF <[email protected]> | 2024-04-13 20:11:31 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-04-13 08:11:31 -0400 |
| commit | 58ecde786f084d78a780bbc07533c7dde8d226c2 (patch) | |
| tree | 20c7abf22eced0ed0ca0dc48c0ce35c721704eb6 | |
| parent | acf4487177c1825eb27e77b72e0ddb52b855302e (diff) | |
[ymodem] fix the cmd "sy" without close file
| -rw-r--r-- | components/utilities/ymodem/ry_sy.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/components/utilities/ymodem/ry_sy.c b/components/utilities/ymodem/ry_sy.c index 557d4bcdab..89664f1ad9 100644 --- a/components/utilities/ymodem/ry_sy.c +++ b/components/utilities/ymodem/ry_sy.c @@ -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; } |
