From 171fca9aaf7273862ff11aedd9ed1e27eaf29e39 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Sat, 27 Feb 2016 20:38:43 +0100 Subject: [PATCH] turns out, our delta() output added dates with # comments. Lua uses -- comments. Duh. Plus stop logging empty lines in delta() --- pdns/dnsdist-console.cc | 2 ++ pdns/dnsdist-lua2.cc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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"; } -- 2.47.2