]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
turns out, our delta() output added dates with # comments. Lua uses -- comments....
authorbert hubert <bert.hubert@netherlabs.nl>
Sat, 27 Feb 2016 19:38:43 +0000 (20:38 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Sat, 27 Feb 2016 19:38:43 +0000 (20:38 +0100)
pdns/dnsdist-console.cc
pdns/dnsdist-lua2.cc

index a293890c8848a10b1ee7ec864d0942407220869d..4c5f39232e76018cc8f09fe9414e241e30480384 100644 (file)
@@ -9,6 +9,8 @@ vector<pair<struct timeval, string> > 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});
index 3360fc57b5d5c9f3d52ffd82bec4a8cc3dc76593..2f766a3fcece0fb82b11ddd67c0a8e19fc748921 100644 (file)
@@ -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";
       }