Date: Mon, 4 Oct 2004 11:02:37 +0200 (CEST) From: Matthias Andree <matthias.andree@gmx.de> To: FreeBSD-gnats-submit@FreeBSD.org Cc: portmgr@FreeBSD.org Subject: ports/72297: [MAINTAINER] news/leafnode: fix high network load Message-ID: <20041004090237.40CFB1B217@merlin.emma.line.org> Resent-Message-ID: <200410040910.i949AMrH022185@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 72297 >Category: ports >Synopsis: [MAINTAINER] news/leafnode: fix high network load >Confidential: no >Severity: critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Mon Oct 04 09:10:22 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Matthias Andree >Release: FreeBSD 5.3-BETA6 i386 >Organization: >Environment: System: FreeBSD merlin.emma.line.org 5.3-BETA6 FreeBSD 5.3-BETA6 #8: Fri Oct 1 04:29:54 CEST >Description: Preempts: ports/72017 (= please commit this patch for 5.3-RELEASE, later back out this patch and apply 72017 when the ports tree is thawed after 5.3.) This is a lightweight but fully working bugfix for the following bug: Leafnode 1.10.5 and previous had a bug that could cause the refetch of the multi-MByte active file from ALL servers when one server was unreachable. Upstream patch submitted by: Brian Sammon. portmgr, please approve this patch so FreeBSD 5.3 can ship with an intact "fetchnews" program in the leafnode package. Generated with FreeBSD Port Tools 0.63 >How-To-Repeat: >Fix: --- leafnode-1.10.5_1.patch begins here --- diff -ruN --exclude=CVS /usr/ports/news/leafnode/Makefile /root/ports/news/leafnode/Makefile --- /usr/ports/news/leafnode/Makefile Mon Sep 6 12:14:37 2004 +++ /root/ports/news/leafnode/Makefile Mon Sep 27 23:39:51 2004 @@ -7,7 +7,7 @@ PORTNAME= leafnode PORTVERSION= 1.10.5 -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= news MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED:S/$/:sourceforge/} \ http://osdn.dl.sourceforge.net/sourceforge/${PORTNAME}/:sourceforge \ diff -ruN --exclude=CVS /usr/ports/news/leafnode/files/patch-fetchnews.c /root/ports/news/leafnode/files/patch-fetchnews.c --- /usr/ports/news/leafnode/files/patch-fetchnews.c Thu Jan 1 01:00:00 1970 +++ /root/ports/news/leafnode/files/patch-fetchnews.c Mon Sep 27 23:44:08 2004 @@ -0,0 +1,55 @@ +--- fetchnews.c Fri Sep 3 01:39:44 2004 ++++ fetchnews.c.new Fri Sep 3 01:37:56 2004 +@@ -2225,6 +2225,7 @@ + volatile int rc = 0, skip_servers = 0; + volatile int anypost = 0, waitchild = 0, quiet; + struct server *current_server; ++ volatile int need_refetch = 0; + + int option, reply; + pid_t pid; +@@ -2380,8 +2381,10 @@ + nntpquit(); + if (!rc) + rc = 2; +- if (forceactive) ++ if (forceactive) { + error_refetch("caught signal that caused a premature abort."); ++ need_refetch = 1; ++ } + skip_servers = 1; /* in this case, jump the while ... loop */ + } else { + canjump = 1; +@@ -2458,8 +2461,10 @@ + /* get list of newsgroups or new newsgroups */ + if (current_server->updateactive) { + if (nntpactive(current_server, &stamp)) { +- if (forceactive) ++ if (forceactive) { + error_refetch("obtaining the active file failed."); ++ need_refetch = 1; ++ } + rc = 1; + } + } else { +@@ -2477,8 +2482,10 @@ + } else { /* reply = nntpconnect */ + if (verbose) + printf("%s: connection failed.\n", current_server->name); +- if (forceactive) ++ if (forceactive && current_server->updateactive) { + error_refetch("fetching the active list from a server failed."); ++ need_refetch = 1; ++ } + rc = 2; + } + if (!usesupplement) +@@ -2545,7 +2552,7 @@ + rc = 1; + } + } else { +- if (rc == 0 && updateactive()) ++ if (need_refetch == 0 && updateactive()) + if (killactiveread()) { + error_refetch("cannot update active.read file."); + rc = 1; --- leafnode-1.10.5_1.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041004090237.40CFB1B217>