}
static ssize_t tftp_recvfrom(int sock, char *pkt, uint16_t* port,
- unsigned timeout, size_t blksize)
+ unsigned timeout, size_t pktlen)
{
ssize_t len;
struct sockaddr_in src;
}
alen = sizeof(src);
- len = recvfrom(sock, pkt, blksize, 0, (struct sockaddr*)&src, &alen);
+ len = recvfrom(sock, pkt, pktlen, 0, (struct sockaddr*)&src, &alen);
if (len < 0) {
sock_perror("recvfrom");
return -1;
/* Not really, but this way the loop sends our WRQ before receiving */
timeout = 1;
- pkt_mkwrq(tx, file_remote, 1464);
+ pkt_mkwrq(tx, file_remote, 1456);
while (!g_interrupted) {
ackblock = -1;