Fixed Intel AMT IDER exception.

This commit is contained in:
Ylian Saint-Hilaire 2022-10-25 14:04:43 -07:00
parent 072924ce69
commit 60af1b6a24
2 changed files with 2 additions and 2 deletions

View File

@ -98,7 +98,7 @@ module.exports = function CreateAmtRemoteIder() {
// Private method
obj.ProcessData = function (data) {
obj.bytesFromAmt += data.length;
if (obj.acc == null) { obj.acc = data; } else { obj.acc = Buffer.concat(obj.acc, data); }
if (obj.acc == null) { obj.acc = data; } else { obj.acc = Buffer.concat([obj.acc, data]); }
if (obj.debug) console.log('IDER-ProcessData', obj.acc.length, obj.acc.toString('hex'));
// Process as many commands as possible

View File

@ -152,7 +152,7 @@ module.exports.CreateAmtRemoteIder = function (webserver, meshcentral) {
obj.ProcessData = function (data) {
data = Buffer.from(data, 'binary');
obj.bytesFromAmt += data.length;
if (obj.acc == null) { obj.acc = data; } else { obj.acc = Buffer.concat(obj.acc, data); }
if (obj.acc == null) { obj.acc = data; } else { obj.acc = Buffer.concat([obj.acc, data]); }
if (obj.debug) console.log('IDER-ProcessData', obj.acc.length, obj.acc.toString('hex'));
// Process as many commands as possible