gethotbyname error continued
Frank Ramsay
fjramsay1234 at hotmail.com
Tue Jun 18 15:52:38 EDT 2002
It is hitting gethostbyname (I put in printfs to be sure sure) and I tried
changing the sethostent(0) to sethostent(1) and it didn't help
BUT
I've discovered that it stops working on the 1022n'd call _every time_
(I removed the sleep in the main loop to get it to run faster) And that is
very strange and I'm wondering if it's a bug in the library itself.
-fjr
>From: Derek Atkins <warlord at MIT.EDU>
>To: "Frank Ramsay" <fjramsay1234 at hotmail.com>
>CC: discuss at blu.org
>Subject: Re: gethotbyname error continued
>Date: 18 Jun 2002 15:02:31 -0400
>
>Are you sure you're not hitting the gethostbyaddr() calls?
>Also, I think the suggestion was to 'sethostent(1)', not (0).
>
>-derek
>
>"Frank Ramsay" <fjramsay1234 at hotmail.com> writes:
>
> > > sethostent(0);
> > > // Detect if we should call gethostbyname() or gethostbyaddr()
> > > if (isalpha(server_name[0])) { /* server address is a name */
> > > hp = gethostbyname(server_name);
> > > } else { /* Convert nnn.nnn address to a usable one */
> > > addr = inet_addr(server_name);
> > > hp = gethostbyaddr((char *)&addr,4,AF_INET);
> > > hp = gethostbyaddr((char *)&addr,5,AF_INET);
> > > }
> > > endhostent();
>
>--
> Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
> Member, MIT Student Information Processing Board (SIPB)
> URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
> warlord at MIT.EDU PGP key available
_________________________________________________________________
Join the world)Bs largest e-mail service with MSN Hotmail.
http://www.hotmail.com
More information about the Discuss
mailing list