From 9a21d4b71e07e02926a3e660b5385c149aaee7c7 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Sun, 6 Apr 2014 15:52:14 +0200 Subject: [PATCH] terminate our hostname with the first ., confuses things otherwise --- pdns/auth-carbon.cc | 2 ++ pdns/rec-carbon.cc | 3 +++ 2 files changed, 5 insertions(+) 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) { -- 2.47.3