diff src/client.c @ 120:05f50c1761d9 noffle

[svn] Applied patch from Matija Nalis: Counters for monitoring --fetch progress.
author enz
date Wed, 19 Jul 2000 08:02:45 +0100
parents dd2fbc88601d
children ec190bad201b
line wrap: on
line diff
--- a/src/client.c	Fri Jun 30 08:10:45 2000 +0100
+++ b/src/client.c	Wed Jul 19 08:02:45 2000 +0100
@@ -1,7 +1,7 @@
 /*
   client.c
 
-  $Id: client.c 156 2000-06-24 20:29:52Z bears $
+  $Id: client.c 174 2000-07-19 07:02:45Z enz $
 */
 
 #if HAVE_CONFIG_H
@@ -957,13 +957,13 @@
 }
 
 static Bool
-retrieveAndStoreArt( const char *msgId )
+retrieveAndStoreArt( const char *msgId, int artcnt, int artmax )
 {
     Bool err;
     DynStr *s = NULL;
     Str line;
 
-    Log_inf( "Retrieving %s", msgId );
+    Log_inf( "[%d/%d] Retrieving %s", artcnt, artmax, msgId );
     s = new_DynStr( 5000 );
     while ( getTxtLn( line, &err ) && ! err )
         DynStr_appLn( s, line );
@@ -1015,11 +1015,11 @@
     else if ( getStat() != STAT_ART_FOLLOWS )
         retrievingFailed( msgId, client.lastStat );
     else
-        retrieveAndStoreArt( msgId );
+        retrieveAndStoreArt( msgId, 0, 0 );
 }
 
 void
-Client_retrieveArtList( const char *list )
+Client_retrieveArtList( const char *list, int *artcnt, int artmax )
 {
     Str msgId;
     DynStr *s;
@@ -1049,7 +1049,7 @@
     {
         if ( getStat() != STAT_ART_FOLLOWS )
             retrievingFailed( msgId, client.lastStat );
-        else if ( ! retrieveAndStoreArt( msgId ) )
+        else if ( ! retrieveAndStoreArt( msgId, ++(*artcnt), artmax ) )
             break;
     }
     del_DynStr( s );