• [slrn] Patch for NNTP extension MAXARTNUM

    From Michael =?ISO-8859-1?Q?B=E4uerle?=@21:1/5 to All on Thu Dec 22 18:10:22 2022
    If some of the slrn users want to test MAXARTNUM:
    The following patch for version 1.3.0a negotiates the value NNTP_ARTNUM_TYPE_MAX as maximum supported article number.

    ------------------------------------------------------------------------
    --- src/nntplib.c.orig 2016-10-23 22:34:16.000000000 +0000
    +++ src/nntplib.c
    @@ -533,6 +533,12 @@ static int _nntp_connect_server (NNTP_Ty
    if (-1 == nntp_authorization (s, Slrn_Force_Authentication))
    return -1;

    +#if defined(HAVE_LONG_LONG)
    + /* Negotiate MAXARTNUM */
    + (void) nntp_server_vcmd (s, "MAXARTNUM " NNTP_FMT_ARTNUM,
    + NNTP_ARTNUM_TYPE_MAX);
    +#endif
    +
    slrn_message_now (_("Connected to host. %s"),
    (s->can_post ? _("Posting ok.") : _("Posting NOT ok.")));

    ------------------------------------------------------------------------

    It is required to compile slrn with a C99 compiler (at least).

    $ NNTPSERVER=news.spitfire-nntp.fr slrn --debug /tmp/slrn.log

    Quoted from "/tmp/slrn.log":
    |
    | !Connecting to server...
    | <200 news.spitfire-nntp.fr running Spitfire News Server 0.9 (Posting allowed).
    | >MODE READER
    | >
    |
    | <200 reader mode.
    | >MAXARTNUM 9223372036854775807
    | >
    |
    | <202 9223372036854775807 is our mutual maximum