Thread View: news.software.nntp
4 messages
4 total messages
Started by Otmar Lendl
Thu, 17 Jul 1997 00:00
My solution to the large control.cancel directory.
Author: Otmar Lendl
Date: Thu, 17 Jul 1997 00:00
Date: Thu, 17 Jul 1997 00:00
70 lines
2553 bytes
2553 bytes
Patch relative to an already hacked inn 1.15.1.
Haven't had time to convert it into a neat INN option + docu yet. :-/
Share and Enjoy !
/ol
--- /tmp/T0a000ra Thu Jul 17 16:40:38 1997
+++ art.c Thu Jul 17 14:11:55 1997
@@ -16,6 +16,9 @@
extern BOOL DoLinks;
extern BOOL DoCancels;
+#define CANCELGROUPS 100
+#define CANCELGROUPS_STEP 100
+
#if defined(S_IXUSR)
#define EXECUTE_BITS (S_IXUSR | S_IXGRP | S_IXOTH)
#else
@@ -1725,6 +1728,9 @@
static BUFFER Files;
static BUFFER Header;
static char buff[SPOOLNAMEBUFF];
+ static int cancelgroup_index = 0;
+ static int cancelgroup_step = 0;
+ static char cancelgroup_name[8];
register char *p;
register int i;
register int j;
@@ -2054,8 +2060,28 @@
/* Control messages not filed in "to" get filed only in control.name
* or control. */
- if (ControlHeader >= 0 && Accepted && !ToGroup) {
- FileGlue(buff, "control", '.', ControlWord);
+ if (ControlHeader >= 0 && Accepted && !ToGroup) {
+ /*
+ * Treat the cancel-messages differently: split them over
+ * CANCELGROUPS individual groups control.cancel.cancel-xxx
+ */
+ if (EQ(ControlWord, "cancel")) {
+ if (!cancelgroup_step) { /* time to step cancelgroup_index ? */
+ cancelgroup_step = CANCELGROUPS_STEP - 1;
+ if (!cancelgroup_index)
+ cancelgroup_index = CANCELGROUPS - 1;
+ else
+ cancelgroup_index--;
+ sprintf(cancelgroup_name,"%03d",cancelgroup_index);
+ }
+ else
+ cancelgroup_step--;
+ FileGlue(buff, "control.cancel.cancel", '-', cancelgroup_name);
+ }
+ else {
+ FileGlue(buff, "control", '.', ControlWord);
+ }
+
if ((ngp = NGfind(buff)) == NULL)
ngp = NGfind(ARTctl);
ngp->PostCount = 0;
--
/ Otmar Lendl (lendl@cosy.sbg.ac.at) # http://www.cosy.sbg.ac.at/~lendl/ \
\ Killfiles generate SEP fields. Beware: the CE-Norm does not cover them. /
Re: My solution to the large control.cancel directory.
Author: Michael Hucka
Date: Thu, 17 Jul 1997 00:00
Date: Thu, 17 Jul 1997 00:00
10 lines
950 bytes
950 bytes
This looks like the same solution Joe Greco used in his patch. http://www.nntp.sol.net/patches/. -- Mike Hucka hucka@umich.edu http://www.eecs.umich.edu/~hucka University PhD to be, computational models of human visual processing (AI Lab) of UNIX systems administrator & programmer/analyst (EECS DCO) Michigan
Re: My solution to the large control.cancel directory.
Author: Joe Greco
Date: Fri, 18 Jul 1997 00:00
Date: Fri, 18 Jul 1997 00:00
31 lines
1862 bytes
1862 bytes
In news.software.nntp article <5qnb13$r0m$1@esel.cosy.sbg.ac.at>, lendl@cosy.sbg.ac.at (Otmar Lendl) wrote: :Michael Hucka <hucka@eecs.umich.edu> wrote: :>This looks like the same solution Joe Greco used in his patch. :>http://www.nntp.sol.net/patches/. : :Not exactly. His patch uses non-standard file-names for a single :group whereas I distribute the cancels into an array of groups. It looks like that distribution is non-deterministic, too. (bad IMHO). :That way, you still can run overview and nnrpd on these groups, :you just don't have a single group with all cancels anymore. : :IMHO that's a better way of doing it. Or you could simply modify nnrpd to recurse directories that it ran across (you'd have to change the subdir format to something like "dir.%d"). Trivial hack. Cleaner. Keeps it as a single group, but still distributes the workload. Could actually be used for some of the big, ugly groups like *.jobs.offered. Users don't like having to go into multiple groups, after all. Don't mind me, I just like solutions which have multiple applications. You can use it for "junk" too, not just "control.cancel". ... JG
Re: My solution to the large control.cancel directory.
Author: Otmar Lendl
Date: Fri, 18 Jul 1997 00:00
Date: Fri, 18 Jul 1997 00:00
19 lines
1301 bytes
1301 bytes
Michael Hucka <hucka@eecs.umich.edu> wrote: >This looks like the same solution Joe Greco used in his patch. >http://www.nntp.sol.net/patches/. Not exactly. His patch uses non-standard file-names for a single group whereas I distribute the cancels into an array of groups. That way, you still can run overview and nnrpd on these groups, you just don't have a single group with all cancels anymore. IMHO that's a better way of doing it. otmar -- / Otmar Lendl (lendl@cosy.sbg.ac.at) # http://www.cosy.sbg.ac.at/~lendl/ \ \ Killfiles generate SEP fields. Beware: the CE-Norm does not cover them. /
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