Fixed custom meshcore upload feature.
Ylian Saint-Hilaire committed
Jan 18, 2021 at 17:04 UTC
ce175203de94bd80fa54de4f11707bf5e71febf0
1 file changed
+1
-2
webserver.js
+1
-2
@@ -5731,8 +5731,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
5731
} else if (coretype == 'custom') {
5732
agent.agentCoreCheck = 1000; // Tell the agent object we are using a custom core.
5733
const hash = obj.crypto.createHash('sha384').update(Buffer.from(coredata, 'binary')).digest().toString('binary'); // Perform a SHA384 hash on the core module
5734
- //console.log('Sending custome core to agent, ' + coredata.length + ' bytes.');
5735
- agent.send(obj.common.ShortToStr(10) + obj.common.ShortToStr(0) + hash + coredata); // Send the code module to the agent
5734
+ agent.sendBinary(obj.common.ShortToStr(10) + obj.common.ShortToStr(0) + hash + coredata); // Send the code module to the agent
5735
}
5736
}
5737
};