return "ERR: scan already running" on scan command when another scan is still running

This commit is contained in:
john30
2017-02-11 08:47:48 +01:00
parent ab9a00de5c
commit 122b725478
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -1157,6 +1157,9 @@ string MainLoop::executeGrab(vector<string> &args) {
string MainLoop::executeScan(vector<string> &args) {
if (args.size() == 1) {
result_t result = m_busHandler->startScan();
if (result == RESULT_ERR_DUPLICATE) {
return "ERR: scan already running";
}
if (result != RESULT_OK) {
logError(lf_main, "scan: %s", getResultCode(result));
}