(Finally) handle block number wraparound correctly.

This commit is contained in:
hpa 2001-11-13 03:11:52 +00:00
parent 52ffc49262
commit 480bee14e9
3 changed files with 14 additions and 5 deletions

View file

@ -104,7 +104,8 @@ tftp_sendfile(int fd, char *name, char *mode)
struct tftphdr *ap; /* data and ack packets */
struct tftphdr *dp;
int n;
volatile int block, size, convert;
volatile u_short block;
volatile int size, convert;
volatile unsigned long amount;
struct sockaddr_in from;
int fromlen;
@ -206,7 +207,8 @@ tftp_recvfile(int fd, char *name, char *mode)
struct tftphdr *ap;
struct tftphdr *dp;
int n;
volatile int block, size, firsttrip;
volatile u_short block;
volatile int size, firsttrip;
volatile unsigned long amount;
struct sockaddr_in from;
int fromlen;