Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: francais@adam.spu.edu (Olivier T CALLE)
Subject: Re: INN?
Date: 25 Mar 1994 18:32:10 -0800	[thread overview]
Message-ID: <2n06ra$fsr@adam.spu.edu> (raw)
In-Reply-To: WELCH.94Mar25092612@wilson.oar.net

In article <WELCH.94Mar25092612@wilson.oar.net> welch@wilson.oar.net
 (Arun Welch) wrote:

>Has anyone gotten INN to run on an Alpha? Any bugs/gotchas?
>
>...arun
>---------------------------------------------------------------------------
>Arun Welch					1224 Kinnear Rd
>Network Engineer				Columbus, OH 43212
>OARnet						welch@oar.net

Yes, I got it running on an AXP 3000-800S without too many differences 
from an Ultrix installation.  The configuration scripts, etc. worked 
well.
There was one little problem, though, that took me a while to narrow 
down.  the inews program wasn't connecting to the server and would spool a 
posted message to be sent later by rnews.  The problem turned up in the 
innsource/lib/remopen.c file in the NNTPconnect procedure.
I think the problem arose because we use an alias name for our server 
(news.spu.edu).
Anyway, when the returned value from the inet_addr() call (an unsigned 
long) is tested for the if statement, the != is not evaluated correctly.  
In our case, the returned value was really -1 (a printf with %lX showed 
all F's).  But since an unsigned long is much larger on the Alpha 
architecture, it didn't look like it overflowed and created the -1, 
instead it looked like a normal (albeit huge) number.  This effectively 
caused a later call to connect() to fail and the whole procedure 
returned a -1 error.  Since my C programming isn't the best and I've 
spent enough time on this already, I "fixed" it for us by commenting out 
the test and making it "if (0)" as you can see.
If someone knows how to fix this properly, I'd be glad to hear about it.

Other than that, no major headaches...


###EXCERPT FROM ORIGINAL remopen.c###

    quadaddr.s_addr = inet_addr(p);
    if (quadaddr.s_addr != (unsigned long)-1) {
	/* Host was specified as a dotted-quad internet address.  Fill in
	 * the parts of the hostent struct that we need. */
	fakehp.h_length = sizeof quadaddr;
	fakehp.h_addrtype = AF_INET;
	hp = &fakehp;
	fakelist[0] = (char *)&quadaddr;
	fakelist[1] = NULL;
	ap = fakelist;
    }
    else if ((hp = gethostbyname(p)) != NULL) {
	/* Symbolic host name. */

###END EXCERPT###

###EXCERPT FROM CHANGED remopen.c###

    quadaddr.s_addr = inet_addr(p);
    if (0) { /* quadaddr.s_addr != (unsigned long)-1) { */
	/* Host was specified as a dotted-quad internet address.  Fill in
	 * the parts of the hostent struct that we need. */
	fakehp.h_length = sizeof quadaddr;
	fakehp.h_addrtype = AF_INET;
	hp = &fakehp;
	fakelist[0] = (char *)&quadaddr;
	fakelist[1] = NULL;
	ap = fakelist;
    }
    else if ((hp = gethostbyname(p)) != NULL) {
	/* Symbolic host name. */

###END EXCERPT###

-- 
Olivier T. CALLE, <francais@spu.edu>, work: 206-281-2435, room: 206-286-7115
snail: MAILSTOP 1686, SPU, Seattle, WA 98119-1997, callsign: N7TAP (Tech+)
EE and CS Tech Student Worker, Computer and Information Systems Hired Hacker
SPU Electrical Engineering Major                                 Psalm 48:14


       reply	other threads:[~1994-03-26  2:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <WELCH.94Mar25092612@wilson.oar.net>
1994-03-26  2:32 ` Olivier T CALLE [this message]
1994-03-29 18:42   ` INN? Dave Sill
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox