🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #265918

[slrn] Patch for NNTP extension MAXARTNUM

#265918
From: Michael Bäuerle
Date: Thu, 22 Dec 2022 17:10
39 lines
2208 bytes
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.
| [...]
Technical Details
Message-ID: <AABjpI9+KioAAAM9.A3.flnews@WStation5.stz-e.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <AABjpI9+KioAAAM9.A3.flnews@WStation5.stz-e.de>
Subject: [slrn] Patch for NNTP extension MAXARTNUM
Date: Thu, 22 Dec 2022 18:10:22 +0100
From: Michael Bäuerle <michael.baeuerle@stz-e.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Newsgroups: news.software.readers
Lines: 39
Reply-To: Michael Bäuerle <michael.baeuerle@gmx.net>
Mime-Version: 1.0
X-Trace: individual.net i88FuFwXacfpyAA+TqouAQMYjIVKll1pHGzbjbinhLMSwz6gIR
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:6WNN7M4PvQ//EWG3YDIL/tM5upc= sha256:1rP9HlRQ18MGf+snAhweMhRO42FqklquLxFgh+HgGM8= sha1:/ryVtuSb+Pm9NJRuePGVax/0pz4=
Injection-Date: Thu, 22 Dec 2022 17:10:22 -0000
User-Agent: flnews/1.2.0pre17 (for NetBSD)