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

Diff for /src/usr.bin/ftp/fetch.c between version 1.209 and 1.210

version 1.209, 2022/09/08 11:12:44 version 1.210, 2022/09/15 12:47:10
Line 173 
Line 173 
         return (epath);          return (epath);
 }  }
   
 /* ARGSUSED */  
 static void  
 tooslow(int signo)  
 {  
         dprintf(STDERR_FILENO, "%s: connect taking too long\n", __progname);  
         _exit(2);  
 }  
   
 /*  /*
  * Copy a local file (used by the OpenBSD installer).   * Copy a local file (used by the OpenBSD installer).
  * Returns -1 on failure, 0 on success   * Returns -1 on failure, 0 on success
Line 604 
Line 596 
                 }                  }
 #endif /* !SMALL */  #endif /* !SMALL */
   
                 if (connect_timeout) {                  error = timed_connect(fd, res->ai_addr, res->ai_addrlen,
                         (void)signal(SIGALRM, tooslow);                      connect_timeout);
                         alarmtimer(connect_timeout);  
                 }  
   
                 for (error = connect(fd, res->ai_addr, res->ai_addrlen);  
                     error != 0 && errno == EINTR; error = connect_wait(fd))  
                         continue;  
                 if (error != 0) {                  if (error != 0) {
                         save_errno = errno;                          save_errno = errno;
                         close(fd);                          close(fd);
Line 700 
Line 686 
         }          }
 #endif  #endif
   
         if (connect_timeout) {  
                 signal(SIGALRM, SIG_DFL);  
                 alarmtimer(0);  
         }  
   
         /*          /*
          * Construct and send the request. Proxy requests don't want leading /.           * Construct and send the request. Proxy requests don't want leading /.
          */           */
Line 1242 
Line 1223 
 {  {
         const char errmsg[] = "\nfetch aborted.\n";          const char errmsg[] = "\nfetch aborted.\n";
   
         alarmtimer(0);  
         write(fileno(ttyout), errmsg, sizeof(errmsg) - 1);          write(fileno(ttyout), errmsg, sizeof(errmsg) - 1);
         longjmp(httpabort, 1);          longjmp(httpabort, 1);
 }  }

Legend:
Removed from v.1.209  
changed lines
  Added in v.1.210