From: Remi Gacogne Date: Mon, 18 Dec 2023 15:55:31 +0000 (+0100) Subject: dnsdist: More delinting in dnsdist-lua-bindings.cc X-Git-Tag: auth-4.9.0-alpha1~28^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13630%2Fhead;p=thirdparty%2Fpdns.git dnsdist: More delinting in dnsdist-lua-bindings.cc --- diff --git a/pdns/dnsdist-lua-bindings.cc b/pdns/dnsdist-lua-bindings.cc index 34a745bb60..79ba4ec57b 100644 --- a/pdns/dnsdist-lua-bindings.cc +++ b/pdns/dnsdist-lua-bindings.cc @@ -108,13 +108,13 @@ void setupLuaBindings(LuaContext& luaCtx, bool client, bool configCheck) #ifndef DISABLE_DOWNSTREAM_BINDINGS /* DownstreamState */ luaCtx.registerFunction("setQPS", [](DownstreamState& state, int lim) { state.qps = lim > 0 ? QPSLimiter(lim, lim) : QPSLimiter(); }); - luaCtx.registerFunction::*)(string)>("addPool", [](const std::shared_ptr& state, string pool) { + luaCtx.registerFunction::*)(string)>("addPool", [](const std::shared_ptr& state, const string& pool) { auto localPools = g_pools.getCopy(); addServerToPool(localPools, pool, state); g_pools.setState(localPools); state->d_config.pools.insert(pool); }); - luaCtx.registerFunction::*)(string)>("rmPool", [](const std::shared_ptr& state, string pool) { + luaCtx.registerFunction::*)(string)>("rmPool", [](const std::shared_ptr& state, const string& pool) { auto localPools = g_pools.getCopy(); removeServerFromPool(localPools, pool, state); g_pools.setState(localPools);