Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gethotbyname error continued



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)B?s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com





BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org