Servd: Clean up unused parseError
parent
87c10410e8
commit
70ad76771e
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue