From 2256134a74a4dd0540eef1453a4e9a748f9c41d4 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Mon, 14 Jan 2002 23:02:01 +0000 Subject: [PATCH] Made newsgroups header fetching final --- ChangeLog | 3 +++ mbfido/scannews.c | 16 ++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0977a33a..f865b0b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4308,6 +4308,8 @@ v0.33.19 26-Oct-2001 automatic set to reasonable defaults. The color editor now has a rangecheck. Rewrote calling of the color editor for Sparc systems. + Added setup items in global and message areas to limit the + fetching of newsgroups headers. mbsebbs: Added menu 317, change FS editor shortcut keys to (Emacs/ @@ -4463,6 +4465,7 @@ v0.33.19 26-Oct-2001 Fixes for Sparc systems. File forwarding now really depends on the downlink billing flag. + Now limits fetching of newsheaders according to area setting. mbfile: During check the file databases are reset to filemode 0660. diff --git a/mbfido/scannews.c b/mbfido/scannews.c index 9d822cb1..1d3b91d3 100644 --- a/mbfido/scannews.c +++ b/mbfido/scannews.c @@ -80,7 +80,7 @@ extern char *replyaddr; /* * Internal functions */ -int do_one_group(List **, char *, char *); +int do_one_group(List **, char *, char *, int); int get_xover(char *, long, long, List **); int get_xoverview(void); void tidy_artlist(List **); @@ -222,7 +222,7 @@ void ScanNews(void) fflush(stdout); } Nopper(); - if (do_one_group(&art, Msgs.Newsgroup, Msgs.Tag) == RETVAL_ERROR) + if (do_one_group(&art, Msgs.Newsgroup, Msgs.Tag, Msgs.MaxArticles) == RETVAL_ERROR) break; } } @@ -245,7 +245,7 @@ void ScanNews(void) -int do_one_group(List **art, char *grpname, char *ftntag) +int do_one_group(List **art, char *grpname, char *ftntag, int maxarticles) { List *tmp; char temp[128], *resp; @@ -269,10 +269,10 @@ int do_one_group(List **art, char *grpname, char *ftntag) total = atol(strtok(NULL, " ")); start = atol(strtok(NULL, " ")); end = atol(strtok(NULL, " '\0'")); - Syslog('n', "GROUP total %d, start %d, end %d", total, start, end); - if ((msgs.MaxArticles) && (total > msgs.MaxArticles)) { - start = end - msgs.MaxArticles; - total = msgs.MaxArticles; + Syslog('n', "GROUP total %d, start %d, end %d, max %d", total, start, end, maxarticles); + if ((maxarticles) && (total > maxarticles)) { + start = end - maxarticles; + total = maxarticles; Syslog('n', "NEW: total %d, start %d, end %d", total, start, end); } if (!total) { @@ -302,7 +302,7 @@ int do_one_group(List **art, char *grpname, char *ftntag) tidy_artlist(art); - if ((msgs.MaxArticles) && (fetched == msgs.MaxArticles)) + if ((maxarticles) && (fetched == maxarticles)) Syslog('!', "Warning: the maximum articles value for this group might be to low"); return RETVAL_OK;