Skip to content

Commit 58ecde7

Browse files
authored
[ymodem] fix the cmd "sy" without close file
1 parent acf4487 commit 58ecde7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

components/utilities/ymodem/ry_sy.c

+3
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,10 @@ static enum rym_code _rym_send_end(
186186
rt_uint8_t *buf,
187187
rt_size_t len)
188188
{
189+
struct custom_ctx *cctx = (struct custom_ctx *)ctx;
189190
rt_memset(buf, 0, len);
191+
close(cctx->fd);
192+
cctx->fd = -1;
190193

191194
return RYM_CODE_SOH;
192195
}

0 commit comments

Comments
 (0)