commit cb096fd8e6fd212e3d06836d0ab738c6804cc30d Author: Karsten Loesing karsten.loesing@gmx.net Date: Tue Apr 17 13:59:59 2012 +0200
Add a comment to the while loop. --- trivsocks-client.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/trivsocks-client.c b/trivsocks-client.c index 9a32c1e..81e4583 100644 --- a/trivsocks-client.c +++ b/trivsocks-client.c @@ -239,6 +239,9 @@ do_http_get(int s, const char *path, const char *hostname, return -1; } } + // Get when the next 10% of expected bytes are received; this is a + // while loop for cases when we expect only very few bytes and read + // more than 10% of them in a single read_all() call. while (*read_bytes < expected_bytes && (*read_bytes * 10) / expected_bytes > perc_logged + 1) { if (gettimeofday(&dataperctime[++perc_logged], NULL)) {
tor-commits@lists.torproject.org