Skip to content

Commit

Permalink
dnsdist: More delinting in dnsdist-lua-bindings.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
rgacogne committed Dec 18, 2023
1 parent 45b4d19 commit 99bad2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pdns/dnsdist-lua-bindings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ void setupLuaBindings(LuaContext& luaCtx, bool client, bool configCheck)
#ifndef DISABLE_DOWNSTREAM_BINDINGS
/* DownstreamState */
luaCtx.registerFunction<void(DownstreamState::*)(int)>("setQPS", [](DownstreamState& state, int lim) { state.qps = lim > 0 ? QPSLimiter(lim, lim) : QPSLimiter(); });
luaCtx.registerFunction<void(std::shared_ptr<DownstreamState>::*)(string)>("addPool", [](const std::shared_ptr<DownstreamState>& state, string pool) {
luaCtx.registerFunction<void(std::shared_ptr<DownstreamState>::*)(string)>("addPool", [](const std::shared_ptr<DownstreamState>& 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<void(std::shared_ptr<DownstreamState>::*)(string)>("rmPool", [](const std::shared_ptr<DownstreamState>& state, string pool) {
luaCtx.registerFunction<void(std::shared_ptr<DownstreamState>::*)(string)>("rmPool", [](const std::shared_ptr<DownstreamState>& state, const string& pool) {
auto localPools = g_pools.getCopy();
removeServerFromPool(localPools, pool, state);
g_pools.setState(localPools);
Expand Down

0 comments on commit 99bad2a

Please sign in to comment.