From 1f26c49ea1d968ff59abe804af14314d5f5dc8de Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pali=20Roh=C3=A1r?= Date: Tue, 3 Aug 2021 16:28:41 +0200 Subject: [PATCH] xyz-modem: Close stream after processing/sending terminate sequence MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Obviously it is not possible to send terminate sequence over stream after closing stream. Signed-off-by: Pali Rohár --- cmd/load.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/load.c b/cmd/load.c index 3904e133c4..e0c896bb79 100644 --- a/cmd/load.c +++ b/cmd/load.c @@ -1009,8 +1009,8 @@ static ulong load_serial_ymodem(ulong offset, int mode) printf("%s\n", xyzModem_error(err)); } - xyzModem_stream_close(&err); xyzModem_stream_terminate(false, &getcxmodem); + xyzModem_stream_close(&err); flush_cache(offset, ALIGN(size, ARCH_DMA_MINALIGN)); -- 2.39.5