Re: gethostname returns loginname on "Pather Server" version
Re: gethostname returns loginname on "Pather Server" version
- Subject: Re: gethostname returns loginname on "Pather Server" version
- From: Justin Walker <email@hidden>
- Date: Thu, 5 Feb 2004 23:16:17 -0800
On Thursday, February 5, 2004, at 09:54 PM, Sanjay Arora wrote:
Well that means I would need to change my code for "Panther Server"
version.
But we would still be interested to know why a standard API like
gethostname would behave differently on "Panther Server" and all other
MacOS
versions.
That is a very good question. I have some as well:
Have you tried the 'hostname' command to verify that it returns
something sensible?
Does this happen on all Mac OS X Server boxes (of those you have access
to) running 10.3?
Does this odd behavior occur on code compiled on the server, or do you
compile it elsewhere and try it on the server?
To add to Quinn's comments, I don't see how getting the host name from
'gethostname()' is going to lead you to an IP address. All this does
is to return what was set by 'sethostname()', and that can be almost
any sequence of bits, totally unrelated to the DNS or other name
resolution scheme in use where your customers are.
Regards,
Justin
--
/~\ The ASCII Justin C. Walker, Curmudgeon-at-Large
\ / Ribbon Campaign
X Help cure HTML Email
/ \
_______________________________________________
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.