From af1ced2e79106ab798d6d43b52929d6b77bfb045 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Wed, 27 Mar 2002 22:44:37 +0000 Subject: [PATCH] Fixed mbfido news stopping on not existing newsgroup --- ChangeLog | 2 ++ mbfido/scannews.c | 11 ++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6d7ab743..5aa9b62c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4677,6 +4677,8 @@ v0.33.20 10-Feb-2002 Made error message in AddMsgHdr function more clear. Removed experimental patch in news->ftn gate were wrong To: address was created. + The mbfido news functions doesn't abort anymore when a + newsgroup didn't exist. mball: Will not crash anymore when it needs more then 10 minutes to diff --git a/mbfido/scannews.c b/mbfido/scannews.c index 0b80177c..a55bf8c7 100644 --- a/mbfido/scannews.c +++ b/mbfido/scannews.c @@ -263,10 +263,11 @@ int do_one_group(List **art, char *grpname, char *ftntag, int maxarticles) resp = nntp_receive(); retval = atoi(strtok(resp, " ")); if (retval != 211) { - if (retval == 411) + if (retval == 411) { WriteError("No such newsgroup: %s", grpname); - else - WriteError("Unknown response %d to GROUP command", retval); + return RETVAL_UNEXPECTEDANS; + } + WriteError("Unknown response %d to GROUP command", retval); return RETVAL_ERROR; } @@ -281,7 +282,7 @@ int do_one_group(List **art, char *grpname, char *ftntag, int maxarticles) } if (!total) { Syslog('N', "No articles"); - return RETVAL_OK; + return RETVAL_NOARTICLES; } retval = get_xover(grpname, start, end, art); @@ -307,7 +308,7 @@ int do_one_group(List **art, char *grpname, char *ftntag, int maxarticles) tidy_artlist(art); if ((maxarticles) && (fetched == maxarticles)) - Syslog('!', "Warning: the maximum articles value for this group might be to low"); + Syslog('!', "Warning: the max. articles value in newsgroup %s might be to low", grpname); return RETVAL_OK; }