make format

pull/1250/head
Jason Rhinelander 4 years ago
parent 1697bf90fe
commit 5cf2126bb9

@ -103,8 +103,7 @@ namespace abyss
bool
ShouldProcessHeader(std::string_view name) const
{
return name == "content-length"sv
|| name == "content-type"sv
return name == "content-length"sv || name == "content-type"sv
|| name == "www-authenticate"sv;
}

@ -164,7 +164,8 @@ namespace llarp
"network", "strict-connect", false, "", AssignmentAcceptor(m_strictConnect));
// TODO: make sure this is documented... what does it mean though?
conf.addUndeclaredHandler("network", [&](std::string_view, std::string_view name, std::string_view value) {
conf.addUndeclaredHandler(
"network", [&](std::string_view, std::string_view name, std::string_view value) {
m_options.emplace(name, value);
return true;
});
@ -236,11 +237,13 @@ namespace llarp
m_OutboundLink = LinkInfoFromINIValues("*", arg);
});
conf.addUndeclaredHandler("bind", [&](std::string_view, std::string_view name, std::string_view value) {
conf.addUndeclaredHandler(
"bind", [&](std::string_view, std::string_view name, std::string_view value) {
LinkInfo info = LinkInfoFromINIValues(name, value);
if (info.port <= 0)
throw std::invalid_argument(stringify("Invalid [bind] port specified on interface", name));
throw std::invalid_argument(
stringify("Invalid [bind] port specified on interface", name));
assert(name != "*"); // handled by defineOption("bind", "*", ...) above
@ -277,7 +280,8 @@ namespace llarp
(void)params;
conf.addUndeclaredHandler(
"services", [this](std::string_view section, std::string_view name, std::string_view value) {
"services",
[this](std::string_view section, std::string_view name, std::string_view value) {
(void)section;
services.emplace_back(name, value);
return true;
@ -422,7 +426,8 @@ namespace llarp
m_mapAddr = arg;
});
conf.addUndeclaredHandler("snapp", [&](std::string_view, std::string_view name, std::string_view value) {
conf.addUndeclaredHandler(
"snapp", [&](std::string_view, std::string_view name, std::string_view value) {
if (name == "blacklist-snode")
{
m_snodeBlacklist.push_back(str(value));

@ -48,7 +48,8 @@ namespace llarp
}
ConfigDefinition&
ConfigDefinition::addConfigValue(std::string_view section, std::string_view name, std::string_view value)
ConfigDefinition::addConfigValue(
std::string_view section, std::string_view name, std::string_view value)
{
// see if we have an undeclared handler to fall back to in case section or section:name is
// absent

@ -100,7 +100,7 @@ win32_tun_io::do_write(void* data, size_t sz)
memset(&pkt->pkt, '\0', sizeof(pkt->pkt));
WriteFile(tunif->tun_fd, data, sz, nullptr, &pkt->pkt);
code = GetLastError();
//llarp::LogInfo("wrote data, error ", code);
// llarp::LogInfo("wrote data, error ", code);
return (code == 0 || code == 997);
}
@ -181,7 +181,7 @@ tun_ev_loop(void* u)
}
logic->call_soon([ev]() {
ev->flush_write();
if(ev->t->tick)
if (ev->t->tick)
ev->t->tick(ev->t);
});
}

@ -400,10 +400,7 @@ namespace llarp
HandleVerifyGotRouter(dht::GotRouterMessage_constptr msg, llarp_async_verify_rc* j);
bool
OnLookup(
const service::Address& addr,
std::optional<IntroSet> i,
const RouterID& endpoint); /* */
OnLookup(const service::Address& addr, std::optional<IntroSet> i, const RouterID& endpoint);
bool
DoNetworkIsolation(bool failed);

@ -45,7 +45,9 @@ namespace llarp
// Shortcut for explicitly casting a string_view to a string. Saves 8 characters compared to
// `std::string(view)`.
inline std::string str(std::string_view s) {
inline std::string
str(std::string_view s)
{
return std::string{s};
}

Loading…
Cancel
Save