Xref: utzoo news.software.nntp:509 news.software.b:4248 Path: utzoo!utstat!helios.physics.utoronto.ca!jarvis.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!decwrl!shelby!ack.Stanford.EDU!pst From: pst@ack.Stanford.EDU (Paul Traina) Newsgroups: news.software.nntp,news.software.b Subject: Re: NNTP's IHAVE gets carried away Message-ID: <1278@shelby.Stanford.EDU> Date: 27 Feb 90 06:22:31 GMT References: <1990Feb26.192046.15663@iwarp.intel.com> Sender: news@shelby.Stanford.EDU Followup-To: news.software.nntp Lines: 27 The problem is that gethistent really does two related but different functions. Gethistent is called by ihave() to determine if an article has been received by the system. Gethistent is called by openartbyid() to actually give the path of the file. In the ihave() instance, there is no need to actually dig through the file to find the damn entry. I've hacked arround this (it's not the best fix, but it was simple), by adding a second parameter to gethistent, which is a flag "returnpath". I then placed the fragment: if (!returnpath) return ""; after the "if (content.dptr == NULL)" line. This will return a valid non-NULL pointer. Then add a ",1" to the gethistent call in openartbyid() and a ",0" in the call in ihave(). Simple, cheap, ugly. It solves the duplicate message problem *and* it gives you an extra performance boost on servicing ihave()'s in general. Now of course, the proper way to do it would be to split the routine up into int artinhistfile() and char *gethistent(). Regards.