[BACK]Return to tftp.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tftp

Diff for /src/usr.bin/tftp/tftp.c between version 1.19 and 1.20

version 1.19, 2006/07/24 17:29:58 version 1.20, 2006/07/26 09:10:03
Line 162 
Line 162 
   
                 /* send data to server and wait for server ACK */                  /* send data to server and wait for server ACK */
                 for (timeouts = 0, error = 0; !intrflag;) {                  for (timeouts = 0, error = 0; !intrflag;) {
                         if (timeouts == maxtimeout) {                          if (timeouts >= maxtimeout) {
                                 printtimeout();                                  printtimeout();
                                 goto abort;                                  goto abort;
                         }                          }
Line 185 
Line 185 
                         pfd[0].events = POLLIN;                          pfd[0].events = POLLIN;
                         nfds = poll(pfd, 1, rexmtval * 1000);                          nfds = poll(pfd, 1, rexmtval * 1000);
                         if (nfds == 0) {                          if (nfds == 0) {
                                 timeouts++;                                  timeouts += rexmtval;
                                 continue;                                  continue;
                         }                          }
                         if (nfds == -1) {                          if (nfds == -1) {
Line 295 
Line 295 
   
                 /* send ACK to server and wait for server data */                  /* send ACK to server and wait for server data */
                 for (timeouts = 0, error = 0; !intrflag;) {                  for (timeouts = 0, error = 0; !intrflag;) {
                         if (timeouts == maxtimeout) {                          if (timeouts >= maxtimeout) {
                                 printtimeout();                                  printtimeout();
                                 goto abort;                                  goto abort;
                         }                          }
Line 317 
Line 317 
                         pfd[0].events = POLLIN;                          pfd[0].events = POLLIN;
                         nfds = poll(pfd, 1, rexmtval * 1000);                          nfds = poll(pfd, 1, rexmtval * 1000);
                         if (nfds == 0) {                          if (nfds == 0) {
                                 timeouts++;                                  timeouts += rexmtval;
                                 continue;                                  continue;
                         }                          }
                         if (nfds == -1) {                          if (nfds == -1) {
Line 602 
Line 602 
                         }                          }
                         if (i == OPT_TIMEOUT) {                          if (i == OPT_TIMEOUT) {
                                 /* verify OACK response */                                  /* verify OACK response */
                                 n = strtonum(value, 1, 255, &errstr);                                  n = strtonum(value, TIMEOUT_MIN, TIMEOUT_MAX,
                                       &errstr);
                                 if (errstr || rexmtval != n ||                                  if (errstr || rexmtval != n ||
                                     opt_tout == 0) {                                      opt_tout == 0) {
                                         nak(EOPTNEG);                                          nak(EOPTNEG);

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20