[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.65 and 1.66

version 1.65, 2006/05/25 03:48:23 version 1.66, 2006/06/01 22:42:11
Line 1129 
Line 1129 
 int  int
 proxy_connect(int socket, char *host)  proxy_connect(int socket, char *host)
 {  {
           int l;
         char buf[1024];          char buf[1024];
         char *connstr, *hosttail, *port;          char *connstr, *hosttail, *port;
   
Line 1147 
Line 1148 
   
         if (debug)          if (debug)
                 printf("CONNECT %s:%s HTTP/1.1\n\n", host, port);                  printf("CONNECT %s:%s HTTP/1.1\n\n", host, port);
         asprintf(&connstr, "CONNECT %s:%s HTTP/1.1\n\n", host, port);          l = asprintf(&connstr, "CONNECT %s:%s HTTP/1.1\n\n", host, port);
         if (!connstr)          if (l == -1)
                 errx(1, "Could not allocate memory to assemble connect string!");                  errx(1, "Could not allocate memory to assemble connect string!");
         if (write(socket, connstr, strlen(connstr)) != strlen(connstr))          if (write(socket, connstr, l) != l)
                  errx(1, "Could not send connect string: %s", strerror(errno));                   errx(1, "Could not send connect string: %s", strerror(errno));
         read(socket, &buf, sizeof(buf)); /* only proxy header XXX: error handling? */          read(socket, &buf, sizeof(buf)); /* only proxy header XXX: error handling? */
         return(200);          return(200);

Legend:
Removed from v.1.65  
changed lines
  Added in v.1.66