refactor: Convert various proto2 cfgs to proto3

This commit is contained in:
John Colvin committed 2023-03-20 13:23:48 -04:00
1 parent f5741d8095
commit fdb4544cb5
36 files changed
+527 -477

No files matched your search

+2 -2
View File
@@ -47,12 +47,12 @@ AuthSessionManager::AuthSessionManager()
bool AuthSessionManager::validate_ip_port(const bts::config::KeyCode &kc) {
bool portgood = true;
if (kc.has_port() && kc.port() != "") {
if (!kc.port().empty()) {
const auto &ports = config::get<config::Ports>();
portgood = std::to_string(ports.config_port()) == kc.port();
}
bool ipgood = true;
if (kc.has_ip() && kc.ip() != "") {
if (!kc.ip().empty()) {
auto ipmap = bts::os::host_ips();
for (const auto &x : ipmap) {
if (x.second == kc.ip()) {