Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Sep 2001 01:54:43 -0700
From:      "G. Paul Ziemba" <paul@treehouse.napa.ca.us>
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>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010908015442.A13609>