aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-02-07 17:05:08 -0800
committerH. Peter Anvin <hpa@zytor.com>2010-02-07 17:05:08 -0800
commit79cd64f95cb84d3e72ae9fd51af6a704d4bcf8ab (patch)
tree7e4fdd4d5234cbcbc7f68e19b4241f301943c4c1
parent9bb975b60999ddd94610b2d66ac7b2b9bfaaea20 (diff)
downloadsyslinux.git-79cd64f95cb84d3e72ae9fd51af6a704d4bcf8ab.tar.gz
syslinux.git-79cd64f95cb84d3e72ae9fd51af6a704d4bcf8ab.tar.xz
syslinux.git-79cd64f95cb84d3e72ae9fd51af6a704d4bcf8ab.zip
sysdump: ymodem: actually retransmit a block if we get NAK
Incorrectly nested loops, we need to actually retransmit if we get a NAK reply... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--com32/sysdump/be_ymodem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/com32/sysdump/be_ymodem.c b/com32/sysdump/be_ymodem.c
index fa2cc602..9d6c9011 100644
--- a/com32/sysdump/be_ymodem.c
+++ b/com32/sysdump/be_ymodem.c
@@ -89,9 +89,9 @@ static void send_ack(struct ymodem_state *ym, const uint8_t *blk, size_t bytes)
{
uint8_t ack_buf;
- serial_write(&ym->serial, blk, bytes);
-
do {
+ serial_write(&ym->serial, blk, bytes);
+
do {
serial_read(&ym->serial, &ack_buf, 1);
} while (ack_buf != ACK && ack_buf != NAK);