[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.108 and 1.109

version 1.108, 2013/03/30 10:11:35 version 1.109, 2013/04/09 08:58:46
Line 751 
Line 751 
         switch (status) {          switch (status) {
         case 200:       /* OK */          case 200:       /* OK */
 #ifndef SMALL  #ifndef SMALL
                 /*                  /*
                  * When we request a partial file, and we receive an HTTP 200                   * When we request a partial file, and we receive an HTTP 200
                  * it is a good indication that the server doesn't support                   * it is a good indication that the server doesn't support
                  * range requests, and is about to send us the entire file.                   * range requests, and is about to send us the entire file.
Line 1485 
Line 1485 
 {  {
         size_t i, len;          size_t i, len;
         char *buf, *q, c;          char *buf, *q, c;
           int ret;
   
         len = 128;          len = 128;
         if ((buf = malloc(len)) == NULL)          if ((buf = malloc(len)) == NULL)
Line 1496 
Line 1497 
                         buf = q;                          buf = q;
                         len *= 2;                          len *= 2;
                 }                  }
                 if (SSL_read(ssl, &c, 1) <= 0)  again:
                         break;                  ret = SSL_read(ssl, &c, 1);
                   if (ret <= 0) {
                           if (SSL_get_error(ssl, ret) == SSL_ERROR_WANT_READ)
                                   goto again;
                           else
                                   errx(1, "SSL_read error: %u",
                                       SSL_get_error(ssl, ret));
                   }
                 buf[i] = c;                  buf[i] = c;
                 if (c == '\n')                  if (c == '\n')
                         break;                          break;

Legend:
Removed from v.1.108  
changed lines
  Added in v.1.109