Index: tftp-transfer.c =================================================================== --- tftp-transfer.c (revision 231851) +++ tftp-transfer.c (working copy) @@ -88,7 +88,7 @@ } n_ack = receive_packet(peer, recvbuffer, - MAXPKTSIZE, NULL, timeoutpacket); + MAXPKTSIZE, NULL, timeoutpacket, 0); if (n_ack < 0) { if (n_ack == RP_TIMEOUT) { if (try == maxtimeouts) { @@ -217,7 +217,7 @@ "Receiving DATA block %d", *block); n_data = receive_packet(peer, recvbuffer, - MAXPKTSIZE, NULL, timeoutpacket); + MAXPKTSIZE, NULL, timeoutpacket, 0); if (n_data < 0) { if (retry == maxtimeouts) { tftp_log(LOG_ERR, @@ -308,7 +308,7 @@ for (i = 0; ; i++) { n_data = receive_packet(peer, (char *)rp, pktsize, - NULL, timeoutpacket); + NULL, timeoutpacket, 0); if (n_data <= 0) break; if (n_data > 0 && Index: tftpd.c =================================================================== --- tftpd.c (revision 231851) +++ tftpd.c (working copy) @@ -576,7 +576,7 @@ send_oack(peer); n = receive_packet(peer, lrecvbuffer, MAXPKTSIZE, - NULL, timeoutpacket); + NULL, timeoutpacket, 1); if (n < 0) { if (debug&DEBUG_SIMPLE) tftp_log(LOG_DEBUG, "Aborting: %s", Index: tftp-io.c =================================================================== --- tftp-io.c (revision 231851) +++ tftp-io.c (working copy) @@ -387,7 +387,7 @@ int receive_packet(int peer, char *data, int size, struct sockaddr_storage *from, - int thistimeout) + int thistimeout, int ignore_error) { struct tftphdr *pkt; struct sockaddr_storage from_local; @@ -463,7 +463,8 @@ } if (pkt->th_opcode == ERROR) { - tftp_log(LOG_ERR, "Got ERROR packet: %s", pkt->th_msg); + if (!ignore_error) + tftp_log(LOG_ERR, "Got ERROR packet: %s", pkt->th_msg); return (RP_ERROR); } Index: tftp-io.h =================================================================== --- tftp-io.h (revision 231851) +++ tftp-io.h (working copy) @@ -41,7 +41,8 @@ int send_oack(int peer); int send_ack(int peer, unsigned short); int send_data(int peer, uint16_t, char *, int); -int receive_packet(int peer, char *, int, struct sockaddr_storage *, int); +int receive_packet(int peer, char *, int, struct sockaddr_storage *, int, + int); extern struct sockaddr_storage peer_sock; extern struct sockaddr_storage me_sock;