View | Details | Raw Unified | Return to bug 47317
Collapse All | Expand All

(-)cups-1.1.17/cups/ipp.c.loop (-3 / +22 lines)
Lines 2011-2017 Link Here
2011
2011
2012
  for (tbytes = 0, bytes = 0; tbytes < length; tbytes += bytes, buffer += bytes)
2012
  for (tbytes = 0, bytes = 0; tbytes < length; tbytes += bytes, buffer += bytes)
2013
  {
2013
  {
2014
    if (http->used > 0)
2014
    if (http->state == HTTP_WAITING)
2015
      break;
2016
2017
    if (http->used > 0 && http->data_encoding == HTTP_ENCODE_LENGTH)
2015
    {
2018
    {
2016
     /*
2019
     /*
2017
      * Do "fast read" from HTTP buffer directly...
2020
      * Do "fast read" from HTTP buffer directly...
Lines 2054-2061 Link Here
2054
	}
2057
	}
2055
      }
2058
      }
2056
    }
2059
    }
2057
    else if ((bytes = httpRead(http, (char *)buffer, length - tbytes)) < 0)
2060
    else
2058
      break;
2061
    {
2062
      /*
2063
       * Wait a maximum of 1 second for data...
2064
       */
2065
2066
      if (!httpWait(http,1000))
2067
      {
2068
        /*
2069
         * Signal no data...
2070
         */
2071
2072
        bytes = -1;
2073
        break;
2074
      }
2075
      else if ((bytes = httpRead(http, (char *)buffer, length - tbytes)) < 0)
2076
        break;
2077
    }
2059
  }
2078
  }
2060
2079
2061
 /*
2080
 /*

Return to bug 47317