Kjeld Mortensen
2008-Dec-16 23:27 UTC
[syslinux] [PATCH] Fixed bug where client recv ACKs error messages from server
--- tftp/tftp.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tftp/tftp.c b/tftp/tftp.c index d15da22..81cb930 100644 --- a/tftp/tftp.c +++ b/tftp/tftp.c @@ -262,12 +262,12 @@ void tftp_recvfile(int fd, const char *name, const char *mode) } amount += size; } while (size == SEGSIZE); - abort: /* ok to ack, since user */ - ap->th_opcode = htons((u_short) ACK); /* has seen err msg */ + ap->th_opcode = htons((u_short) ACK); ap->th_block = htons((u_short) block); (void)sendto(f, ackbuf, 4, 0, (struct sockaddr *)&peeraddr, SOCKLEN(&peeraddr)); write_behind(file, convert); /* flush last buffer */ + abort: fclose(file); stopclock(); if (amount > 0) -- 1.5.3.4
Geert Stappers
2008-Dec-17 20:05 UTC
[syslinux] [PATCH] Fixed bug where client recv ACKs error messages from server
Op 20081217 om 00:27 schreef Kjeld Mortensen:> --- > tftp/tftp.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tftp/tftp.c b/tftp/tftp.c > index d15da22..81cb930 100644 > --- a/tftp/tftp.c > +++ b/tftp/tftp.c > @@ -262,12 +262,12 @@ void tftp_recvfile(int fd, const char *name, > const char *mode) > } > amount += size; > } while (size == SEGSIZE); > - abort: /* ok to ack, since user */ > - ap->th_opcode = htons((u_short) ACK); /* has seen err msg */ > + ap->th_opcode = htons((u_short) ACK); > ap->th_block = htons((u_short) block); > (void)sendto(f, ackbuf, 4, 0, (struct sockaddr *)&peeraddr, > SOCKLEN(&peeraddr)); > write_behind(file, convert); /* flush last buffer */ > + abort: > fclose(file); > stopclock(); > if (amount > 0)Hey, that is most likely a follow-up on the thread from October 17th 2008 Cheers Geert Stappers