Thread View: news.software.nn
1 messages
1 total messages
Started by Wietse Venema
Sat, 26 Jun 1993 09:06
Re: fix to make nn+nov crosspost aware
Author: 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;
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads