gethostbyname() issue
gethostbyname() issue
- Subject: gethostbyname() issue
- From: Edward Fink <email@hidden>
- Date: Fri, 1 Nov 2002 13:35:23 -0500
Hi,
I am having a problem with the "hostent" returned via function
gethostbyname(). Most of the time it works perfectly and...for a
while...I was unable to recreate the problem until I found a hostname
that consistently recreates the issue. Currently...if I use host
"irc.hagabard.com" in gethostbyname()....and then try to reference
h_addr my app crashes.
The crash can be recreated using something like this:
struct hostent *h;
h = gethostbyname("irc.hagabard.com");
then reference h->h_addr anyway you wish and the app should crash.
Anyone know what is happening here and how to fix? I have temporarily
worked around this issue by using NSHost...but for some reason NSHost
is horribly slow for me...taking up to 3 minutes to run?
Any help would be great.
Thannks,
Ed Fink
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.