fb73aeaec50a746a7957679568885dbe0b0e773c galt Tue Sep 17 17:02:16 2013 -0700 fixing progress indicator diff --git src/lib/paraFetch.c src/lib/paraFetch.c index 0ea1f6b..b15ef51 100644 --- src/lib/paraFetch.c +++ src/lib/paraFetch.c @@ -175,31 +175,31 @@ * is non-NULL, then it gets called passing the context parameter, and if it returns * TRUE the fetch is interrupted. Overall the parallelFetchInterruptable returns TRUE * when the function succeeds without interrupt, FALSE otherwise. */ { char *origPath = outPath; char outTemp[1024]; safef(outTemp, sizeof(outTemp), "%s.paraFetch", outPath); outPath = outTemp; /* get the size of the file to be downloaded */ off_t fileSize = 0; off_t totalDownloaded = 0; ssize_t sinceLastStatus = 0; char *dateString = ""; int star = 1; int starMax = 20; -int starStep = 1; +off_t starStep = 1; // TODO handle case-sensitivity of protocols input if (startsWith("http://",url) || startsWith("https://",url)) { struct hash *hash = newHash(0); int status = netUrlHead(url, hash); if (status != 200) // && status != 302 && status != 301) { warn("Error code: %d, expected 200 for %s, can't proceed, sorry", status, url); return FALSE; } char *sizeString = hashFindValUpperCase(hash, "Content-Length:"); if (sizeString) { fileSize = atoll(sizeString); }