From: bert hubert Date: Sun, 6 Apr 2014 13:52:14 +0000 (+0200) Subject: terminate our hostname with the first ., confuses things otherwise X-Git-Tag: rec-3.6.0-rc1~78 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9a21d4b71e07e02926a3e660b5385c149aaee7c7;p=thirdparty%2Fpdns.git terminate our hostname with the first ., confuses things otherwise --- diff --git a/pdns/auth-carbon.cc b/pdns/auth-carbon.cc index 8af852ff11..6f9c078b0b 100644 --- a/pdns/auth-carbon.cc +++ b/pdns/auth-carbon.cc @@ -37,6 +37,8 @@ try char tmp[80]; memset(tmp, 0, sizeof(tmp)); gethostname(tmp, sizeof(tmp)); + char *p = strchr(tmp, '.'); + if(p) *p=0; hostname=tmp; } BOOST_FOREACH(const string& entry, entries) { diff --git a/pdns/rec-carbon.cc b/pdns/rec-carbon.cc index ba1eb06a02..685958003f 100644 --- a/pdns/rec-carbon.cc +++ b/pdns/rec-carbon.cc @@ -29,6 +29,9 @@ try char tmp[80]; memset(tmp, 0, sizeof(tmp)); gethostname(tmp, sizeof(tmp)); + char *p = strchr(tmp, '.'); + if(p) *p=0; + hostname=tmp; } BOOST_FOREACH(const all_t::value_type& val, all) {