PATCH: innd: pathcluster
Julien ÉLIE
julien at trigofacile.com
Sun Apr 6 13:13:46 UTC 2008
Hi Miquel,
> If you have multiple servers that exchange newsfeeds with the
> outside world it can be useful to have the same path-name on
> all outgoing articles.
>
> This patch adds a setting called 'pathcluster' that adds a
> common name to the Path: header on all incoming articles. 'path'
> and 'pathalias' (if set) are still appended to the path as
> usual, but 'pathcluster' is always appended as the last element
> (e.g. on the leftmost side of the Path).
Thanks a lot for your patch.
> - if (strncmp(Path.data, hops[0], Path.used - 1) == 0)
> + i = strlen(hops[0]);
> + if (i == Path.used - 1 &&
> + strncmp(Path.data, hops[0], Path.used - 1) == 0)
> data->Hassamepath = true;
if (i == (signed int) Path.used - 1 &&
strncmp(Path.data, hops[0], Path.used - 1) == 0)
Do you agree or is there a better way to cast that?
Other files patched:
===================================================================
--- doc/pod/innd.pod (révision 7726)
+++ doc/pod/innd.pod (copie de travail)
@@ -360,8 +360,9 @@
The local site's name (as set with the I<pathhost> parameter in
F<inn.conf>) and an exclamation point are prepended to the Path: header,
provided the first site name in the Path: header is different from the
-local one. In addition, I<pathalias> may be similarly prepended to the
-Path: header; see inn.conf(5) for the details.
+local one. In addition, I<pathalias> and I<pathcluster> may be similarly
+respectively prepended and appended to the Path: header; see inn.conf(5)
+for the details.
The Xref: header is removed and a new one created.
===================================================================
--- scripts/inncheck.in (révision 7726)
+++ scripts/inncheck.in (copie de travail)
@@ -299,6 +299,9 @@
# } elsif ( $k eq "pathalias" ) {
# print "$file:$line: pathalias has a ! in it\n"
# if $v =~ /!/;
+# } elsif ( $k eq "pathcluster" ) {
+# print "$file:$line: pathcluster has a ! in it\n"
+# if $v =~ /!/;
# } elsif ( $k eq "server" ) {
# print "$file:$line: server (`$v') isn't local hostname\n"
# if $pedantic && $fqdn !~ /^$v/;
===================================================================
--- samples/inn.conf.in (révision 7726)
+++ samples/inn.conf.in (copie de travail)
@@ -47,6 +47,7 @@
maxartsize: 1000000
maxconnections: 50
#pathalias:
+#pathcluster:
pgpverify: @DO_PGPVERIFY@
port: 119
refusecybercancels: false
===================================================================
--- tests/lib/innconf-t.c (révision 7726)
+++ tests/lib/innconf-t.c (copie de travail)
@@ -55,7 +55,7 @@
fclose(config);
ok(7, !innconf_check("config/tmp"));
unlink("config/tmp");
- ok_string(8, "config/tmp:26: unknown parameter foo\n", errors);
+ ok_string(8, "config/tmp:27: unknown parameter foo\n", errors);
errors_uncapture();
free(errors);
errors = NULL;
--
Julien ÉLIE
« Tant qu'il y a des marmites, il y a de l'espoir ! » (Astérix)
More information about the inn-workers
mailing list