]> granicus.if.org Git - curl/commitdiff
updated to use the new set of progress-functions
authorDaniel Stenberg <daniel@haxx.se>
Mon, 14 Feb 2000 22:57:42 +0000 (22:57 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 14 Feb 2000 22:57:42 +0000 (22:57 +0000)
lib/dict.c
lib/file.c
lib/ftp.c
lib/http.c

index 99abf49f6357021040dea27894324fdb684f60fd..cf604ec5b8aa217282caf7e741fc5a0a18043dc9 100644 (file)
@@ -243,6 +243,10 @@ UrgError dict(struct UrlData *data, char *path, long *bytecount)
     }
   }
 
+#if 0
   ProgressEnd(data);
+#endif
+  pgrsDone(data);
+
   return URG_OK;
 }
index b5d198e577121edb584f50b5598d1ab711fbc100..99759f4770090125446fddcd5b4a50eebd009ccb 100644 (file)
@@ -145,7 +145,12 @@ UrgError file(struct UrlData *data, char *path, long *bytecountp)
      this is both more efficient than the former call to download() and
      it avoids problems with select() and recv() on file descriptors
      in Winsock */
+#if 0
   ProgressInit (data, expected_size);
+#endif
+  if(expected_size != -1)
+    pgrsSetDownloadSize(data, expected_size);
+
   while (1) {
     nread = read(fd, buf, BUFSIZE-1);
 
@@ -164,10 +169,16 @@ UrgError file(struct UrlData *data, char *path, long *bytecountp)
       return URG_WRITE_ERROR;
     }
     now = tvnow();
+    pgrsUpdate(data);
+#if 0
     ProgressShow (data, bytecount, start, now, FALSE);
+#endif
   }
   now = tvnow();
+#if 0
   ProgressShow (data, bytecount, start, now, TRUE);
+#endif
+  pgrsUpdate(data);
 
   close(fd);
 
index da67ecb865ea6ba5a2b2d4f9191f9b50e25fcb13..e3da491792f40a481913a9e309c2a2aec9b5f35e 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -752,7 +752,10 @@ UrgError _ftp(struct UrlData *data,
     /* When we know we're uploading a specified file, we can get the file
        size prior to the actual upload. */
 
+    pgrsSetUploadSize(data, data->infilesize);
+#if 0
     ProgressInit(data, data->infilesize);
+#endif
     result = Transfer(data, -1, -1, FALSE, NULL, /* no download */
                       data->secondarysocket, bytecountp);
     if(result)
@@ -999,7 +1002,10 @@ UrgError _ftp(struct UrlData *data,
        
   }
   /* end of transfer */
+#if 0
   ProgressEnd(data);
+#endif
+  pgrsDone(data);
 
   /* shut down the socket to inform the server we're done */
   sclose(data->secondarysocket);
index c37318d8f02ce21c99fe334f975f7dfed8a8f4c9..bf89d97b0631471f0a22a44fd5640ddcab5634c4 100644 (file)
@@ -317,8 +317,11 @@ UrgError http(struct UrlData *data, char *ppath, char *host, long *bytecount)
         sendf(data->firstsocket, data,
               "Content-Length: %d\r\n",
               postsize-2);
-       
+
+       pgrsSetUploadSize(data, postsize);
+#if 0
         ProgressInit(data, postsize);
+#endif
 
         result = Transfer(data, data->firstsocket, -1, TRUE, &readbytecount,
                           data->firstsocket, &writebytecount);
@@ -348,8 +351,11 @@ UrgError http(struct UrlData *data, char *ppath, char *host, long *bytecount)
       else
         sendf(data->firstsocket, data,
               "\015\012");
-        
+
+#if 0        
       ProgressInit(data, data->infilesize);
+#endif
+      pgrsSetUploadSize(data, data->infilesize);
 
       result = Transfer(data, data->firstsocket, -1, TRUE, &readbytecount,
                         data->firstsocket, &writebytecount);
@@ -370,8 +376,12 @@ UrgError http(struct UrlData *data, char *ppath, char *host, long *bytecount)
     }
     if(result)
       return result;
-      
+
+#if 0      
     ProgressEnd(data);
+#endif
+    pgrsDone(data);
+
   } while (0); /* this is just a left-over from the multiple document download
                   attempts */