diff --git a/tftpd/tftpd.c b/tftpd/tftpd.c index 14182f3..d9b3f46 100644 --- a/tftpd/tftpd.c +++ b/tftpd/tftpd.c @@ -1660,17 +1660,21 @@ static void tftp_sendfile(const struct formats *pf, struct tftphdr *oap, int oac /* * Receive a file. */ -static void tftp_recvfile(const struct formats *pf, struct tftphdr *oap, int oacklen) +static void tftp_recvfile(const struct formats *pf, + struct tftphdr *oack, int oacklen) { struct tftphdr *dp; int n, size; /* These are "static" to avoid longjmp funnies */ + static struct tftphdr *oap; static struct tftphdr *ap; /* ack buffer */ static u_short block = 0; static int acksize; u_short dp_opcode, dp_block; unsigned long r_timeout; + oap = oack; + dp = w_init(); do { timeout = rexmtval;