Changeset 809f4451 in rtems


Ignore:
Timestamp:
Dec 13, 1999, 5:03:37 PM (22 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
6b79a071
Parents:
9537e5e
Message:

Correction from Eric Norum for timeout in TFTP driver following bug
report by Nick.SIMON@…:

TFTP uses UDP and UDP packets are prime targets for getting dropped when
the network gets busy. I want the number of retries quite large in my
application. I see that PACKET_REPLY_MILLISECONDS is, in fact, not
being used.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/libnetworking/lib/tftpDriver.c

    r9537e5e r809f4451  
    306306        struct timeval tv;
    307307
    308         tv.tv_sec = 6;
    309         tv.tv_usec = 0;
     308        tv.tv_sec = PACKET_REPLY_MILLISECONDS / 1000;
     309        tv.tv_usec = (PACKET_REPLY_MILLISECONDS % 1000) * 1000;
    310310        setsockopt (tp->socket, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv);
    311311        for (;;) {
     
    336336        }
    337337        tv.tv_sec = 0;
     338        tv.tv_usec = 0;
    338339        setsockopt (tp->socket, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv);
    339340        return len;
  • c/src/libnetworking/lib/tftpDriver.c

    r9537e5e r809f4451  
    306306        struct timeval tv;
    307307
    308         tv.tv_sec = 6;
    309         tv.tv_usec = 0;
     308        tv.tv_sec = PACKET_REPLY_MILLISECONDS / 1000;
     309        tv.tv_usec = (PACKET_REPLY_MILLISECONDS % 1000) * 1000;
    310310        setsockopt (tp->socket, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv);
    311311        for (;;) {
     
    336336        }
    337337        tv.tv_sec = 0;
     338        tv.tv_usec = 0;
    338339        setsockopt (tp->socket, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv);
    339340        return len;
  • cpukit/libnetworking/lib/tftpDriver.c

    r9537e5e r809f4451  
    306306        struct timeval tv;
    307307
    308         tv.tv_sec = 6;
    309         tv.tv_usec = 0;
     308        tv.tv_sec = PACKET_REPLY_MILLISECONDS / 1000;
     309        tv.tv_usec = (PACKET_REPLY_MILLISECONDS % 1000) * 1000;
    310310        setsockopt (tp->socket, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv);
    311311        for (;;) {
     
    336336        }
    337337        tv.tv_sec = 0;
     338        tv.tv_usec = 0;
    338339        setsockopt (tp->socket, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv);
    339340        return len;
Note: See TracChangeset for help on using the changeset viewer.