refactor: Convert various proto2 cfgs to proto3
This commit is contained in:
1 parent
f5741d8095
commit
fdb4544cb5
36 files changed
+527
-477
No files matched your search
@@ -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()) {
|
||||
|
||||
Reference in new issue
Block a user