don't fail the entire discovery if one of the scan targets fails
This commit is contained in:
parent
f5dd8af698
commit
65e9d98510
@ -65,10 +65,10 @@ void Discovery::discoveryFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
|||||||
|
|
||||||
if (exitCode != 0 || exitStatus != QProcess::NormalExit) {
|
if (exitCode != 0 || exitStatus != QProcess::NormalExit) {
|
||||||
qCWarning(dcNetworkDetector()) << "Nmap error failed. Is nmap installed correctly?";
|
qCWarning(dcNetworkDetector()) << "Nmap error failed. Is nmap installed correctly?";
|
||||||
emit finished({});
|
|
||||||
m_discoveryProcesses.removeAll(discoveryProcess);
|
m_discoveryProcesses.removeAll(discoveryProcess);
|
||||||
discoveryProcess->deleteLater();
|
discoveryProcess->deleteLater();
|
||||||
discoveryProcess = nullptr;
|
discoveryProcess = nullptr;
|
||||||
|
finishDiscovery();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,7 +139,7 @@ void Discovery::discoveryFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
|||||||
|
|
||||||
if (foundHosts == 0 && m_discoveryProcesses.isEmpty()) {
|
if (foundHosts == 0 && m_discoveryProcesses.isEmpty()) {
|
||||||
qCDebug(dcNetworkDetector()) << "Network scan successful but no hosts found in this network";
|
qCDebug(dcNetworkDetector()) << "Network scan successful but no hosts found in this network";
|
||||||
emit finished({});
|
finishDiscovery();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user