Curl_gethostname: return un-qualified machine name
authorSteve Holme <steve_holme@hotmail.com>
Tue, 13 Sep 2011 21:19:47 +0000 (22:19 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 18 Sep 2011 11:24:58 +0000 (13:24 +0200)
commit42be24af893c6605b15112e50f2516828ad9e24d
tree6fee4597a286cc52b45c0f052105e72bd54840a4
parent260b0f4d0cdb7c0ce30b16ae9a4cb94de6b36537
Curl_gethostname: return un-qualified machine name

Fixed Curl_gethostname() so that it always returns the un-qualified
machine name rather than being dependent on the socket provider.

Note: The return of getenv("CURL_GETHOSTNAME") is also parsed in case
the developer / test harness provided a fully qualified domain name as
it's value as well.
lib/curl_gethostname.c