]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix warning: initialized lambda captures are a C++14 extension
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 24 Aug 2020 08:51:52 +0000 (10:51 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 24 Aug 2020 08:51:52 +0000 (10:51 +0200)
pdns/pdns_recursor.cc

index 8d1d1686191d250f2feb2a1052cc270fca459071..9469dc91ef49787b6ac23e6665cacf10061878a5 100644 (file)
@@ -2855,8 +2855,9 @@ static void handleNewUDPQuestion(int fd, FDMultiplexer::funcparam_t& var)
           }
 
           if(g_weDistributeQueries) {
-            distributeAsyncFunction(data, [data = data, fromaddr, dest, source, destination, tv, fd, proxyProtocolValues]() mutable
-              { return doProcessUDPQuestion(data, fromaddr, dest, source, destination, tv, fd, proxyProtocolValues); });
+            const std::string& localdata = data;
+            distributeAsyncFunction(data, [localdata, fromaddr, dest, source, destination, tv, fd, proxyProtocolValues]() mutable
+              { return doProcessUDPQuestion(localdata, fromaddr, dest, source, destination, tv, fd, proxyProtocolValues); });
           }
           else {
             ++s_threadInfos[t_id].numberOfDistributedQueries;