From: bert hubert Date: Sat, 27 Feb 2016 19:38:43 +0000 (+0100) Subject: turns out, our delta() output added dates with # comments. Lua uses -- comments.... X-Git-Tag: rec-4.0.0-alpha2~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=171fca9aaf7273862ff11aedd9ed1e27eaf29e39;p=thirdparty%2Fpdns.git turns out, our delta() output added dates with # comments. Lua uses -- comments. Duh. Plus stop logging empty lines in delta() --- diff --git a/pdns/dnsdist-console.cc b/pdns/dnsdist-console.cc index a293890c88..4c5f39232e 100644 --- a/pdns/dnsdist-console.cc +++ b/pdns/dnsdist-console.cc @@ -9,6 +9,8 @@ vector > g_confDelta; // MUST BE CALLED UNDER A LOCK - right now the LuaLock void feedConfigDelta(const std::string& line) { + if(line.empty()) + return; struct timeval now; gettimeofday(&now, 0); g_confDelta.push_back({now,line}); diff --git a/pdns/dnsdist-lua2.cc b/pdns/dnsdist-lua2.cc index 3360fc57b5..2f766a3fce 100644 --- a/pdns/dnsdist-lua2.cc +++ b/pdns/dnsdist-lua2.cc @@ -238,7 +238,7 @@ void moreLua(bool client) struct tm tm; localtime_r(&d.first.tv_sec, &tm); char date[80]; - strftime(date, sizeof(date)-1, "# %a %b %d %Y %H:%M:%S %Z\n", &tm); + strftime(date, sizeof(date)-1, "-- %a %b %d %Y %H:%M:%S %Z\n", &tm); g_outputBuffer += date; g_outputBuffer += d.second + "\n"; }