From 61ade40a51f352434667094450a000f863b66f3e Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Mon, 9 Sep 2019 07:36:21 -0400 Subject: [PATCH] reduce logging and make format --- llarp/ev/ev.cpp | 2 +- llarp/handlers/tun.cpp | 5 ----- llarp/router/router.cpp | 5 +++-- llarp/router_contact.cpp | 2 +- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/llarp/ev/ev.cpp b/llarp/ev/ev.cpp index 4d7c3de3d..d2e2ae423 100644 --- a/llarp/ev/ev.cpp +++ b/llarp/ev/ev.cpp @@ -102,7 +102,7 @@ llarp_ev_add_tun(struct llarp_ev_loop *loop, struct llarp_tun_io *tun) { LogError("invalid ifname on tun: ", tun->ifname); return false; - } + } #if !defined(_WIN32) return loop->tun_listen(tun); #else diff --git a/llarp/handlers/tun.cpp b/llarp/handlers/tun.cpp index ebf9d6c52..474060f4b 100644 --- a/llarp/handlers/tun.cpp +++ b/llarp/handlers/tun.cpp @@ -733,11 +733,6 @@ namespace llarp m_Exit->QueueUpstreamTraffic(std::move(pkt), llarp::routing::ExitPadSize); } - else - { - llarp::LogWarn(Name(), " has no endpoint for ", dst); - llarp::DumpBuffer(pkt.ConstBuffer()); - } return; } if(m_SNodes.at(itr->second)) diff --git a/llarp/router/router.cpp b/llarp/router/router.cpp index 8648ce3b6..b595551bd 100644 --- a/llarp/router/router.cpp +++ b/llarp/router/router.cpp @@ -356,7 +356,8 @@ namespace llarp Router::FromConfig(Config *conf) { // Set netid before anything else - if(!conf->router.netId().empty() && strcmp(conf->router.netId().c_str(), Version::LLARP_NET_ID)) + if(!conf->router.netId().empty() + && strcmp(conf->router.netId().c_str(), Version::LLARP_NET_ID)) { const auto &netid = conf->router.netId(); llarp::LogWarn("!!!! you have manually set netid to be '", netid, @@ -1174,7 +1175,7 @@ namespace llarp } else { - LogWarn("Message failed sending to ", remote); + LogDebug("Message failed sending to ", remote); } } } // namespace llarp diff --git a/llarp/router_contact.cpp b/llarp/router_contact.cpp index d2712161a..da315dd88 100644 --- a/llarp/router_contact.cpp +++ b/llarp/router_contact.cpp @@ -250,7 +250,7 @@ namespace llarp bool RouterContact::IsExpired(llarp_time_t now) const { - (void) now; + (void)now; return false; // return Age(now) >= Lifetime; }