96f013483bfe1e4018431f34f946ac999890ea51
kent
  Tue May 7 09:11:22 2013 -0700
Moving parallelFetch to a new module.
diff --git src/lib/paraFetch.c src/lib/paraFetch.c
index f98b5de..7b28efe 100644
--- src/lib/paraFetch.c
+++ src/lib/paraFetch.c
@@ -1,27 +1,28 @@
 /* paraFetch - fetch things from remote URLs in parallel. */
 
 #include <utime.h>
 #include "common.h"
 #include "internet.h"
 #include "errabort.h"
 #include "hash.h"
 #include "linefile.h"
 #include "net.h"
 #include "https.h"
 #include "sqlNum.h"
 #include "obscure.h"
+#include "paraFetch.h"
 
 
 static void paraFetchWriteStatus(char *origPath, struct parallelConn *pcList, 
     char *url, off_t fileSize, char *dateString, boolean isFinal)
 /* Write a status file.
  * This has two purposes.
  * First, we can use it to resume a failed transfer.
  * Second, we can use it to follow progress */
 {
 char outTempX[1024];
 char outTemp[1024];
 safef(outTempX, sizeof(outTempX), "%s.paraFetchStatusX", origPath);
 safef(outTemp, sizeof(outTemp), "%s.paraFetchStatus", origPath);
 struct parallelConn *pc = NULL;
 
@@ -51,31 +52,30 @@
 
 boolean paraFetchReadStatus(char *origPath, 
     struct parallelConn **pPcList, char **pUrl, off_t *pFileSize, 
     char **pDateString, off_t *pTotalDownloaded)
 /* Read a status file - which is just origPath plus .paraFetchStatus.  This is updated during 
  * transit by parallelFetch. Returns FALSE if status file not there - possibly because
  * transfer is finished.  Any of the return parameters (pThis and pThat) may be NULL */
 {
 char outTemp[1024];
 char outStat[1024];
 safef(outStat, sizeof(outStat), "%s.paraFetchStatus", origPath);
 safef(outTemp, sizeof(outTemp), "%s.paraFetch", origPath);
 struct parallelConn *pcList = NULL, *pc = NULL;
 off_t totalDownloaded = 0;
 
-uglyf("paraFetchReadStatus on %s<BR>\n", outStat);
 if (!fileExists(outStat))
     {
     unlink(outTemp);
     return FALSE;
     }
 
 if (!fileExists(outTemp))
     {
     unlink(outStat);
     return FALSE;
     }
 
 char *line, *word;
 struct lineFile *lf = lineFileOpen(outStat, TRUE);
 if (!lineFileNext(lf, &line, NULL))