#include <boost/format.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/foreach.hpp>
+#include "version.hh"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/time.h>
#include "lock.hh"
#include "responsestats.hh"
-#include "version_generated.h"
+
#include "secpoll-recursor.hh"
#include "pubsuffix.hh"
#include "namespaces.hh"
}
if(cmd=="version") {
- return string(PDNS_VERSION)+"\n";
+ return getPDNSVersion()+"\n";
}
if(cmd=="quit-nicely") {
#include "logger.hh"
#include "arguments.hh"
#include "version.hh"
-#include "version_generated.h"
#include "dnsparser.hh"
#include "misc.hh"
#include <boost/foreach.hpp>
#include "statbag.hh"
#include <stdint.h>
#ifndef PACKAGEVERSION
-#define PACKAGEVERSION PDNS_VERSION
+#define PACKAGEVERSION getPDNSVersion()
#endif
string g_security_message;
struct timeval now;
gettimeofday(&now, 0);
- string query = "auth-" PACKAGEVERSION ".security-status."+::arg()["security-poll-suffix"];
+ string query = "auth-" +PACKAGEVERSION +".security-status."+::arg()["security-poll-suffix"];
if(*query.rbegin()!='.')
query+='.';
}
else {
- L<<Logger::Warning<<"Could not retrieve security status update for '" PACKAGEVERSION "' on '"+query+"', RCODE = "<< RCode::to_s(res)<<endl;
+ L<<Logger::Warning<<"Could not retrieve security status update for '" +PACKAGEVERSION+ "' on '"+query+"', RCODE = "<< RCode::to_s(res)<<endl;
if(security_status == 1) // it was ok, not it is unknown
security_status = 0;
}
#include "logger.hh"
#include "arguments.hh"
#include "version.hh"
-#include "version_generated.h"
+
#include <stdint.h>
#ifndef PACKAGEVERSION
-#define PACKAGEVERSION PDNS_VERSION
+#define PACKAGEVERSION getPDNSVersion()
#endif
uint32_t g_security_status;
vector<DNSResourceRecord> ret;
- string query = "recursor-" PACKAGEVERSION ".security-status."+::arg()["security-poll-suffix"];
+ string query = "recursor-" +PACKAGEVERSION+ ".security-status."+::arg()["security-poll-suffix"];
if(*query.rbegin()!='.')
query+='.';
*last_secpoll=now.tv_sec;
}
else {
- L<<Logger::Warning<<"Could not retrieve security status update for '" PACKAGEVERSION "' on '"+query+"', RCODE = "<< RCode::to_s(res)<<endl;
+ L<<Logger::Warning<<"Could not retrieve security status update for '" +PACKAGEVERSION+ "' on '"+query+"', RCODE = "<< RCode::to_s(res)<<endl;
if(g_security_status == 1) // it was ok, not it is unknown
g_security_status = 0;
if(res == RCode::NXDomain) // if we had servfail, keep on trying more more frequently
return "Unknown";
}
+string getPDNSVersion()
+{
+ return PDNS_VERSION;
+}
+
// REST API product type
string productTypeApiType() {
switch (productType) {
void showProductVersion();
void showBuildConfiguration();
string fullVersionString();
+string getPDNSVersion();
string productName();
string productTypeApiType();
void versionSetProduct(ProductType pt);