Mercurial > noffle
diff src/fetch.c @ 155:22b81617d427 noffle
[svn] applied patch from Matija Nalis: better handling of inconsistent counters
at remote server; do not read overview on each group command
author | enz |
---|---|
date | Tue, 05 Dec 2000 19:50:09 +0000 |
parents | b2a4f839affd |
children | 09ca6eb5c7ff |
line wrap: on
line diff
--- a/src/fetch.c Tue Dec 05 19:30:50 2000 +0000 +++ b/src/fetch.c Tue Dec 05 19:50:09 2000 +0000 @@ -1,7 +1,7 @@ /* fetch.c - $Id: fetch.c 235 2000-12-05 19:30:50Z enz $ + $Id: fetch.c 236 2000-12-05 19:50:09Z enz $ */ #if HAVE_CONFIG_H @@ -81,7 +81,7 @@ static void fetchNewArts( const char *name, FetchMode mode ) { - int next, first, last; + int next, first, last, refetch; if ( ! Client_changeToGrp( name ) ) { @@ -113,9 +113,12 @@ } if ( next > last + 1 ) { - Log_err( "Article number inconsistent (%s rmt=%lu-%lu, next=%lu)", - name, first, last, next ); - Pseudo_cntInconsistent( name, first, last, next ); + refetch = last - Cfg_maxFetch() + 1; + if ( refetch < 0 ) refetch = 1; + Log_err( "Article number inconsistent (%s rmt=%lu-%lu, next=%lu). Refetching from %lu", + name, first, last, next, refetch ); + Pseudo_cntInconsistent( name, first, last, next, refetch ); + first = refetch; } else if ( next < first ) {