Article View: news.software.nn
Article #4210Re: fix to make nn+nov crosspost aware
From: Wietse Venema
Date: Sat, 26 Jun 1993 09:06
Date: Sat, 26 Jun 1993 09:06
89 lines
3792 bytes
3792 bytes
Note: this is a corrected version of an earlier patch.
A week or so ago I picked up the nn+nov sources from world.std.com.
Unlike the "old" nn, the nov version did not recognize crosspostings.
The annoying result is that articles would be displayed again and again
in all posted-to newsgroups.
The patch below makes nn+nov aware of crosspostings. For this to work,
the overview database must carry information about all the groups that
an article is posted to. The Xref: header (by default not copied to the
overview database) is adequate for this purpose. Reportedly, enabling
Xref: also speeds up the trn newsreader.
The patch assumes that the Xref: header *name* is part of the overview
database entries (i.e. enable Xref:full with INN). INN admins note:
after installing the modified overview.fmt file, make sure that a new
overchan proces is started (`ctlinnd reload all' should do).
I have used this only with local and NFS access to the news spool, but
expect that the patch will also work with Peter Orbaek's patches for
nn+nov with NNTP support.
As far as nn is concerned, there is no need to rebuild the overview
database after enabling Xref:. Old articles without Xref: overview
info will still show up in every posted-to newsgroup, but this
behaviour will go away once the old news has expired.
Trn, at least the non-NNTP version, seems to require that the database
is rebuilt, or its xref chasing algorithms get upset.
Wietse Venema
Eindhoven University of Technology
The Netherlands
*** db.c- Wed May 12 19:55:39 1993
--- db.c Sat Jun 26 10:47:58 1993
***************
*** 597,604 ****
if (*p == '<')
dhp->dh_replies++;
}
! dhp->dh_cross_postings = 0; /* $$$$$$$ fix me */
if (dhp->dh_number < 0) {
current_digest_article = dhp->dh_number = -dhp->dh_number;
ddp->dh_type = DH_DIGEST_HEADER;
--- 597,637 ----
if (*p == '<')
dhp->dh_replies++;
}
! dhp->dh_cross_postings = 0;
+ /*
+ * Scan Xref: for newsgroup names. Should use Newsgroups: header,
+ * but that header is not even listed in the INN overview.fmt file.
+ */
+ if (artp->a_others && strncmp("Xref: ", artp->a_others, 6) == 0) {
+ char *start;
+ char *end;
+ int n = 0;
+ group_header *gh;
+
+ /* Skip Xref: and hostname. */
+ start = artp->a_others + sizeof("Xref: ") - 1;
+ while (*start && isspace(*start)) start++;
+ while (*start &&!isspace(*start)) start++;
+
+ while (*start && n < DBUF_SIZE + 1) {
+
+ /* Find group and `:' between group and article nr. */
+ while (*start && isspace(*start)) start++;
+ if ((end = strchr(start, ':')) == 0)
+ break;
+ *end = 0;
+
+ /* Map group name to group number. */
+ if (gh = lookup(start))
+ db_data.dh_cross[n++] = gh->group_num;
+
+ /* Skip article number. */
+ start = end + 1;
+ while (*start &&!isspace(*start)) start++;
+ }
+ dhp->dh_cross_postings = n;
+ }
if (dhp->dh_number < 0) {
current_digest_article = dhp->dh_number = -dhp->dh_number;
ddp->dh_type = DH_DIGEST_HEADER;
Technical Details
Message-ID:
<20h3i7$k08@wzv.win.tue.nl>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmd.de!Germany.EU.net!mcsun!sun4nl!tuegate.tue.nl!svin09.info.win.tue.nl!wzv.win.tue.nl!wzv.win.tue.nl!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <20h3i7$k08@wzv.win.tue.nl> Subject: Re: fix to make nn+nov crosspost aware Date: Sat, 26 Jun 1993 09:06:15 +0000 From: wietse@wzv.win.tue.nl (Wietse Venema) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmd.de!Germany.EU.net!mcsun!sun4nl!tuegate.tue.nl!svin09.info.win.tue.nl!wzv.win.tue.nl!wzv.win.tue.nl!not-for-mail Newsgroups: news.software.nn,news.software.readers Followup-To: poster Organization: Eindhoven University of Technology, The Netherlands Lines: 89 NNTP-Posting-Host: wzv.win.tue.nl