From: Remi Gacogne Date: Thu, 9 Aug 2018 17:04:20 +0000 (+0200) Subject: rec: Fix 'logQuery' compilation without protobuf support X-Git-Tag: dnsdist-1.3.3~161^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16bbc6e3cc5d6c42246c9b4a87417595d159ccec;p=thirdparty%2Fpdns.git rec: Fix 'logQuery' compilation without protobuf support --- diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index d854a7f0ee..3748fb5611 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -1766,12 +1766,13 @@ static void handleRunningTCPQuestion(int fd, FDMultiplexer::funcparam_t& var) bool needXPF = g_XPFAcl.match(conn->d_remote); string requestorId; string deviceId; + bool logQuery = false; #ifdef HAVE_PROTOBUF auto luaconfsLocal = g_luaconfs.getLocal(); if (checkProtobufExport(luaconfsLocal)) { needECS = true; } - bool logQuery = t_protobufServer && luaconfsLocal->protobufExportConfig.logQueries; + logQuery = t_protobufServer && luaconfsLocal->protobufExportConfig.logQueries; #endif if(needECS || needXPF || (t_pdl && (t_pdl->d_gettag_ffi || t_pdl->d_gettag))) { @@ -1932,6 +1933,7 @@ static string* doProcessUDPQuestion(const std::string& question, const ComboAddr ComboAddress destination = destaddr; string requestorId; string deviceId; + bool logQuery = false; #ifdef HAVE_PROTOBUF boost::uuids::uuid uniqueId; auto luaconfsLocal = g_luaconfs.getLocal(); @@ -1941,7 +1943,7 @@ static string* doProcessUDPQuestion(const std::string& question, const ComboAddr } else if (checkOutgoingProtobufExport(luaconfsLocal)) { uniqueId = (*t_uuidGenerator)(); } - bool logQuery = t_protobufServer && luaconfsLocal->protobufExportConfig.logQueries; + logQuery = t_protobufServer && luaconfsLocal->protobufExportConfig.logQueries; bool logResponse = t_protobufServer && luaconfsLocal->protobufExportConfig.logResponses; #endif EDNSSubnetOpts ednssubnet;