diff --git a/agents/MeshService-signed.exe b/agents/MeshService-signed.exe index 556506ff..464b9d16 100644 Binary files a/agents/MeshService-signed.exe and b/agents/MeshService-signed.exe differ diff --git a/agents/MeshService.exe b/agents/MeshService.exe index 6bcbc9ac..fec668af 100644 Binary files a/agents/MeshService.exe and b/agents/MeshService.exe differ diff --git a/agents/MeshService64-signed.exe b/agents/MeshService64-signed.exe index 0f0cafbf..2516ac3d 100644 Binary files a/agents/MeshService64-signed.exe and b/agents/MeshService64-signed.exe differ diff --git a/agents/MeshService64.exe b/agents/MeshService64.exe index 5c24aee4..d9043522 100644 Binary files a/agents/MeshService64.exe and b/agents/MeshService64.exe differ diff --git a/amtscanner.js b/amtscanner.js index 9fdbcd1c..d982cccb 100644 --- a/amtscanner.js +++ b/amtscanner.js @@ -110,8 +110,7 @@ module.exports.CreateAmtScanner = function (parent) { // Look for all AMT computers that may be locally reachable and poll their presence obj.performScan = function () { - //console.log('performScan'); - if (obj.action == false) { return false; } + if (obj.active == false) { return false; } obj.parent.db.getLocalAmtNodes(10, function (err, docs) { // TODO: handler more than 10 computer scan at the same time. DNS resolved may need to be a seperate module. for (var i in obj.scanTable) { obj.scanTable[i].present = false; } if (err == null && docs.length > 0) { diff --git a/db.js b/db.js index 79940905..1c64d084 100644 --- a/db.js +++ b/db.js @@ -109,7 +109,7 @@ module.exports.CreateDB = function (parent) { obj.dispose = function () { for (var x in obj) { if (obj[x].close) { obj[x].close(); } delete obj[x]; } } obj.clearOldEntries = function (type, days, domain) { var cutoff = Date.now() - (1000 * 60 * 60 * 24 * days); obj.file.remove({ type: type, time: { $lt: cutoff } }, { multi: true }); } obj.getPowerTimeline = function (nodeid, func) { if (obj.databaseType == 1) { obj.file.find({ type: 'power', node: { $in: ['*', nodeid] } }).sort({ time: 1 }).exec(func); } else { obj.file.find({ type: 'power', node: { $in: ['*', nodeid] } }).sort({ time: 1 }, func); } } - obj.getLocalAmtNodes = function (limit, func) { obj.file.find({ type: 'node', host: { $exists: true, $ne: null }, intelamt: { $exists: true } }).limit(limit, func); } + obj.getLocalAmtNodes = function (limit, func) { obj.file.find({ type: 'node', host: { $exists: true, $ne: null }, intelamt: { $exists: true } }).limit(limit).exec(func); } obj.getAmtUuidNode = function (meshid, uuid, func) { obj.file.find({ type: 'node', meshid: meshid, 'intelamt.uuid': uuid }, func); } // This is used to rate limit a number of operation per day. Returns a startValue each new days, but you can substract it and save the value in the db. diff --git a/package.json b/package.json index e00adf98..07f2fdac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meshcentral", - "version": "0.1.9-b", + "version": "0.1.9-c", "keywords": [ "Remote Management", "Intel AMT",