Batcher and it's man page.

Julien ÉLIE julien at trigofacile.com
Tue Oct 20 21:01:03 UTC 2009


Hi Kamil,

> man batcher:
>
> [...]
> All other lines in the input should consist of one or two fields
> separated by a single space.  The first field is either the storage API
> token of an article or the name of a file holding an article.
> [...]
> -S spool
>           Specifies an additional spool directory to search in for
>           articles.  If this option is given, the first field of an
>           input line is a relative path name, and if the article isn't
>           found in patharticles, it is also looked for under spool.
> [...]
>
> Unfortunately, it looks like that batcher ignores filenames, and
> properly process only lines with storage tokens in them.

Oh, you're quite right.
It appears that batcher does not deal with path names.  The -S flag
should no longer exist!

See revision 2444 (October 1999):
    http://inn.eyrie.org/trac/changeset/2444/trunk

Strange that such a feature disappeared in archive, batcher and cvtbatch...
It does not seem to be an error since the warning "not token" was clearly
added!
Yet, there is dead code like:

    /* Go to where the articles are. */
    if (chdir(innconf->patharticles) < 0)
        sysdie("%s cannot chdir to %s", Host, innconf->patharticles);


        /* Strip of leading spool pathname. */
        if (line[0] == '/'
         && line[strlen(innconf->patharticles)] == '/'
         && strncmp(line, innconf->patharticles, strlen(innconf->patharticles)) == 0)
            p = line + strlen(innconf->patharticles) + 1;
        else
            p = line;


Weird...



> Is it planned restoration of handling lines with filenames? (Or I have
> to write it by myself? :) )

I see that innxmit can still handle both of them (though the documentation
only mentions tokens!).

/*
**  Open an article.  If the argument is a token, retrieve the article via
**  the storage API.  Otherwise, open the file and fake up an ARTHANDLE for
**  it.  Only fill in those fields that we'll need.  Articles not retrieved
**  via the storage API will have a type of TOKEN_EMPTY.
*/
static ARTHANDLE *
article_open(const char *path, const char *id)
{
[...]



You can also look at a previous version of innxmit in case you want to
backport the code, if it still works.

-- 
Julien ÉLIE

« Memoriam quoque ipsam cum uoce perdidissemus,
  si tam in nostra potestate esset obliuisci quam tacere. »
  (Tacite, _Vie d'Agricola_) 




More information about the inn-workers mailing list