🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nn
Article #10641

Re: [long] nntpserver error and debug logged

#10641
From: Mike Hoehn
Date: Mon, 07 Mar 2005 23:13
39 lines
2226 bytes
Arctic Fidelity <spam@sacrificumdeo.net> writes:

>Here are my additions coupled with the diffs for Slackware regarding the
>nntp.c file, 

>% diff nntp.c nntp.c.new
>[...]
>> 	printf("NNTP host %s is unknown -- edit /etc/nntpserver\n",nntp_server);

This line from the nn.badnntphost.diff patch is the problem, because the
the brackets {} of the else statement are missing.

See here (nntp_check() ). The patch inserts above line between these two
lines:

    else
        nn_exitmsg(1, "NNTPSERVER is invalid");

with the result being this:

    else
        printf("NNTP host %s is unknown -- edit /etc/nntpserver\n",nntp_server);
        nn_exitmsg(1, "NNTPSERVER is invalid");

This means nn_exitmsg() is called every time, no matter which part of the
if/else statement is executed.

Instead it should look like this:

    else
    {
        printf("NNTP host %s is unknown -- edit /etc/nntpserver\n",nntp_server);
        nn_exitmsg(1, "NNTPSERVER is invalid");
    }

I just tested it with and without brackets. Without I get the "NNTPSERVER
is invalid" message. With brackets nn works well!

  Mike
Technical Details
Message-ID: <422ce010$0$1088$9b4e6d93@newsread2.arcor-online.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nn.20140326.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshosting.com!nx01.iad01.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!feed.news.tiscali.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!news.arcor.de!not-for-mail
References: <5ridnR3tOZKw1LvfRVn-gQ@gvtc.com>

Show Full Headers
Complete Article Headers
Message-ID: <422ce010$0$1088$9b4e6d93@newsread2.arcor-online.net>
Subject: Re: [long] nntpserver error and debug logged
Date: Mon, 07 Mar 2005 23:13:20 +0000
From: Mike Hoehn <spamhere@birnehh.shacknet.nu>
References: <5ridnR3tOZKw1LvfRVn-gQ@gvtc.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nn.20140326.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshosting.com!nx01.iad01.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!feed.news.tiscali.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!news.arcor.de!not-for-mail
Newsgroups: news.software.nn
User-Agent: nn/6.6.5
Lines: 39
Organization: Arcor
NNTP-Posting-Date: 08 Mar 2005 00:13:20 MET
NNTP-Posting-Host: 26c825a8.newsread2.arcor-online.net
X-Trace: DXC=G5<=9?J8b:9CDTkn::RD0?Q5U85hF6f;
 4jW\KbG]kaM8liQbn6H@_E9\2MEU8mJRW53JnWATi1G=0e=J[Z1c@I; 5X2i3nCYFkN5
X-Complaints-To: abuse@arcor.de