mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 09:28:40 +02:00
Servd: Clean up unused parseError
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user