Servd: Clean up unused parseError

pull/86/head
Kyle Schwarz 2026-05-12 16:57:04 -04:00
parent 87c10410e8
commit 70ad76771e
1 changed files with 0 additions and 3 deletions

View File

@ -67,14 +67,12 @@ void Servd::Find(std::vector<FoundDevice>& found) {
EventManager::GetInstance().add(APIEvent::Type::ServdTransceiveError, APIEvent::Severity::Error); EventManager::GetInstance().add(APIEvent::Type::ServdTransceiveError, APIEvent::Severity::Error);
return; return;
} }
bool parseError = false;
const auto lines = split(response, '\n'); const auto lines = split(response, '\n');
for(auto&& line : lines) { for(auto&& line : lines) {
const auto cols = split(line, ' '); const auto cols = split(line, ' ');
if(cols.size() < 3) { if(cols.size() < 3) {
if(!line.empty()) { if(!line.empty()) {
EventManager::GetInstance().add(APIEvent::Type::ServdInvalidResponseError, APIEvent::Severity::Error); EventManager::GetInstance().add(APIEvent::Type::ServdInvalidResponseError, APIEvent::Severity::Error);
parseError = true;
} }
continue; continue;
} }
@ -85,7 +83,6 @@ void Servd::Find(std::vector<FoundDevice>& found) {
port = static_cast<uint16_t>(std::stoi(cols[2])); port = static_cast<uint16_t>(std::stoi(cols[2]));
} catch (const std::exception&) { } catch (const std::exception&) {
EventManager::GetInstance().add(APIEvent::Type::ServdInvalidResponseError, APIEvent::Severity::Error); EventManager::GetInstance().add(APIEvent::Type::ServdInvalidResponseError, APIEvent::Severity::Error);
parseError = true;
continue; continue;
} }
Address address(ip.c_str(), port); Address address(ip.c_str(), port);