From owner-freebsd-stable Sat Sep 8 1:55:21 2001 Delivered-To: freebsd-stable@freebsd.org Received: from badclam.mayannetworks.com (badclam.mayannetworks.com [63.93.198.73]) by hub.freebsd.org (Postfix) with ESMTP id 8FEAE37B401 for ; Sat, 8 Sep 2001 01:55:18 -0700 (PDT) Received: (from Utree@localhost) by badclam.mayannetworks.com (8.9.3/8.9.3) id BAA16330 for freebsd-stable@freebsd.org; Sat, 8 Sep 2001 01:55:13 -0700 (PDT) X-Authentication-Warning: badclam.mayannetworks.com: Utree set sender to paul@treehouse.napa.ca.us using -f >Received: (from paul@localhost) by hairball.treehouse.napa.ca.us (8.11.4/8.11.4) id f888sh315293; Sat, 8 Sep 2001 01:54:43 -0700 (PDT) (envelope-from paul) Date: Sat, 8 Sep 2001 01:54:43 -0700 From: "G. Paul Ziemba" To: thierry@thomas.as Cc: freebsd-stable@freebsd.org Subject: freebsd-4.3 newsx-1.4 history.c fix for DO_TAGGED_HASH Message-ID: <20010908015442.A13609@hairball.treehouse.napa.ca.us> Mime-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.2.5i Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Thierry, Thanks for your newsx-1.4 port. I built mine against an INN that had tagged-hash enabled and encountered the problem that all of newsx's history lookups indicated that the article was already present. Traced this to dbzfetch (in the DO_TAGGED_HASH case) returning 0 for message-ids it couldn't find, and 0 was interpreted as having found the article. Here's the fix: --- history.c.orig Thu Apr 8 03:56:13 1999 +++ history.c Fri Sep 7 23:38:35 2001 @@ -142,6 +142,9 @@ OFFSET_T offset; # ifdef DO_TAGGED_HASH offset = dbzfetch(key); + if (!offset) { /* gpz 010907 start */ + offset = -1; + } /* gpz 010907 end */ # else idxrec ionevalue; idxrecext iextvalue; @@ -161,6 +164,8 @@ log_msg(L_DEBUGMORE,"msgid %s not in history",msgid); return 0; } + log_msg(L_DEBUGMORE,"dbzver=6, msgid %s IS in history, off=%d", + msgid, offset); } /* OK, we found it */ return 1; -- G. Paul Ziemba paul@w6yx.stanford.edu FreeBSD unix: 1:26AM up 14 days, 38 mins, 5 users, load averages: 0.25, 0.11, 0.03 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message