Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[slrn] Patch for NNTP extension MAXARTNUM

1 view
Skip to first unread message

Michael Bäuerle

unread,
Dec 22, 2022, 12:10:25 PM12/22/22
to
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 article number.
| [...]
0 new messages