[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.29 and 1.30

version 1.29, 2000/05/02 00:54:53 version 1.30, 2000/05/03 19:50:41
Line 290 
Line 290 
         hints.ai_socktype = SOCK_STREAM;          hints.ai_socktype = SOCK_STREAM;
         port = portnum ? portnum : httpport;          port = portnum ? portnum : httpport;
         error = getaddrinfo(host, port, &hints, &res0);          error = getaddrinfo(host, port, &hints, &res0);
           if (error == EAI_SERVICE && port == httpport) {
                   /*
                    * If the services file is corrupt/missing, fall back
                    * on our hard-coded defines.
                    */
                   char pbuf[NI_MAXSERV];
   
                   snprintf(pbuf, sizeof(pbuf), "%d", HTTP_PORT);
                   error = getaddrinfo(host, pbuf, &hints, &res0);
           }
         if (error) {          if (error) {
                 warnx("%s: %s", gai_strerror(error), host);                  warnx("%s: %s", gai_strerror(error), host);
                 goto cleanup_url_get;                  goto cleanup_url_get;

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30