]> granicus.if.org Git - pdns/commitdiff
terminate our hostname with the first ., confuses things otherwise
authorbert hubert <bert.hubert@netherlabs.nl>
Sun, 6 Apr 2014 13:52:14 +0000 (15:52 +0200)
committerbert hubert <bert.hubert@netherlabs.nl>
Sun, 6 Apr 2014 13:52:14 +0000 (15:52 +0200)
pdns/auth-carbon.cc
pdns/rec-carbon.cc

index 8af852ff11f33d66f5fe48f3cfcaf0557e6f4753..6f9c078b0bea8625365067e1c7cef687f28c81e2 100644 (file)
@@ -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) {
index ba1eb06a02c272f40626b8ed8b9bbe6115b6a88f..685958003f2a373bf19eb6c5c6a640f9f70df836 100644 (file)
@@ -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) {